Private
Public Access
avance creando entidades
This commit is contained in:
1 parent
1d755376f6
commit
7cadb9c84b
25 files changed
+200
-47
No files matched your search
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"repuestera_back/config"
|
||||
"repuestera_back/dto"
|
||||
"repuestera_back/models"
|
||||
models_seguridad "repuestera_back/models/seguridad"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
@@ -43,7 +43,7 @@ func Refresh(c *gin.Context) {
|
||||
c.JSON(http.StatusUnauthorized, gin.H{"error": "invalid token claims"})
|
||||
return
|
||||
}
|
||||
var user models.Usuario
|
||||
var user models_seguridad.Usuario
|
||||
if err := config.DB.First(&user, sub).Error; err != nil {
|
||||
c.JSON(http.StatusNotFound, gin.H{"error": "user not found"})
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user