Добавлен основные классы для сервиса авторизаци

This commit is contained in:
Ганеев Артем
2025-10-28 20:49:54 +03:00
parent def3552a67
commit 736b8031f8
26 changed files with 904 additions and 40 deletions

View File

@@ -0,0 +1,15 @@
package handler
import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
)
type error struct {
Message string `json:"message"`
}
func newErrorResponse(c *gin.Context, statusCode int, message string) {
logrus.Error(message)
c.AbortWithStatusJSON(statusCode, error{Message: message})
}