This commit is contained in:
parent
22a7e7b755
commit
2a12d95946
@ -36,7 +36,7 @@ func (tm *TaskManagerRepository) UpdateUser(user *users.User) error {
|
|||||||
|
|
||||||
func (tm *TaskManagerRepository) GetUser(user_name string) (*users.User, error) {
|
func (tm *TaskManagerRepository) GetUser(user_name string) (*users.User, error) {
|
||||||
user := users.User{}
|
user := users.User{}
|
||||||
row := tm.db.QueryRow("SELECT (id,login,password,email) FROM task_manager.users WHERE login=$1", user_name)
|
row := tm.db.QueryRow("SELECT id,login,password,email FROM task_manager.users WHERE login=$1", user_name)
|
||||||
err := row.Scan(&user.Id, &user.Name, &user.Password, &user.Email)
|
err := row.Scan(&user.Id, &user.Name, &user.Password, &user.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Ошибка получения пользователя:", err)
|
log.Println("Ошибка получения пользователя:", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user