fix get user by token method

This commit is contained in:
ykomissarov committed 2019-05-08 15:46:26 +03:00
1 parent 8f2a6a58f2
commit 0d956b6bf6
4 files changed
+69 -7

No files matched your search

+2 -2
View File
@@ -10,7 +10,7 @@ import (
const DELETE_USERS = "DELETE FROM " + utils.DB_SCHEME + ".users WHERE id IN (?)"
func GetUserByToken(token string) (*structure.AdminUserShort, error) {
/*func GetUserByToken(token string) (*structure.AdminUserShort, error) {
var user structure.AdminUserShort
_, err := database.GetDBManager().Db.Model(&user).
Query(&user, `SELECT
@@ -28,7 +28,7 @@ func GetUserByToken(token string) (*structure.AdminUserShort, error) {
return nil, nil
}
return &user, err
}
}*/
func GetUserByEmail(email string) (*libStr.AdminUser, error) {
var user libStr.AdminUser