fix: auth middleware double responses on early rejection (#16444)

### Summary

As title:
This commit is contained in:
Haruko386
2026-06-29 19:02:37 +08:00
committed by GitHub
parent 98323e7910
commit c5e10a1578

View File

@@ -129,6 +129,7 @@ func (h *AuthHandler) AuthMiddleware() gin.HandlerFunc {
"code": common.CodeForbidden,
"message": "Super user shouldn't access the URL",
})
c.Abort()
return
}
@@ -141,6 +142,7 @@ func (h *AuthHandler) AuthMiddleware() gin.HandlerFunc {
"message": errMsg,
"data": "No",
})
c.Abort()
return
}