v1.2.0: back: use gorm in login

Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
GnomeZworc 2024-03-31 00:01:49 +01:00
commit 8f3d9da55e
Signed by: nicolas.boufideline
GPG key ID: 4406BBBF8845D632
2 changed files with 7 additions and 13 deletions

View file

@ -21,7 +21,7 @@ func login(c echo.Context) error {
return c.JSON(http.StatusBadRequest, err)
}
if response, err := logins.CreateLogin(db, request); err != nil {
if response, err := logins.CreateLogin(dbGor, request); err != nil {
return c.JSON(http.StatusBadRequest, "Not a valide user username or password")
} else {
return c.JSON(http.StatusOK, response)