Reorganization of backend + new routes
This commit is contained in:
@@ -8,7 +8,8 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
core "fr.latosa-escrima/api/core"
|
||||
core "fr.latosa-escrima/core"
|
||||
"fr.latosa-escrima/core/models"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
@@ -52,7 +53,7 @@ func HandleLogin(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
user, err := core.Verify(context.Background(), login.Email, login.Password)
|
||||
user, err := models.Verify(core.DB, context.Background(), login.Email, login.Password)
|
||||
if user == nil {
|
||||
core.JSONError{
|
||||
Status: core.Error,
|
||||
|
||||
Reference in New Issue
Block a user