Reorganization of backend + new routes

This commit is contained in:
cdricms
2025-01-29 18:09:41 +01:00
parent 7c66353e63
commit 8110172a38
67 changed files with 1124 additions and 400 deletions

View File

@@ -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,