feat: add API getallorders and getorder by id
This commit is contained in:
@@ -52,7 +52,6 @@ func AuthRequired() gin.HandlerFunc {
|
||||
func AdminOnly() gin.HandlerFunc {
|
||||
return func(c *gin.Context) {
|
||||
role, exists := c.Get("role")
|
||||
|
||||
if !exists || role != "Админ" {
|
||||
c.JSON(http.StatusForbidden, gin.H{"error": "Доступ ограничен"})
|
||||
c.Abort()
|
||||
|
||||
Reference in New Issue
Block a user