Updated User model fields

This commit is contained in:
2022-09-28 16:14:30 +02:00
parent 4f8d553923
commit db1bee79ac
4 changed files with 4 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ func Login(ctx *fiber.Ctx) error {
}
user := new(models.User)
result := db.Where(&models.User{Username: body.Username, Password: body.Password}).Select("id").First(user)
result := db.Where(&models.User{Login: body.Username, Password: body.Password}).Select("id").First(user)
if result.Error != nil {
return errors.New("invalid combination of username and password")