v1.2.0: back: use gorm in login
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
a2288ec90a
commit
8f3d9da55e
2 changed files with 7 additions and 13 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue