优化鉴权

This commit is contained in:
xh
2025-09-19 03:33:02 +08:00
parent 1c1d27681e
commit 5bc7d9dffd
20 changed files with 182 additions and 261 deletions
@@ -14,9 +14,11 @@ import (
func RoleRoute(rg *gin.RouterGroup) {
handle := RoleHandler{}
notAuth := rg.Group("/system", middleware.LoginAuth())
notAuth.GET("/role/all", handle.All)
rg = rg.Group("/system", middleware.TokenAuth())
rg.GET("/role/all", handle.All)
// rg.GET("/role/all", handle.All)
rg.GET("/role/list", middleware.RecordLog("角色列表"), handle.List)
rg.GET("/role/detail", middleware.RecordLog("角色详情"), handle.Detail)
rg.POST("/role/add", middleware.RecordLog("角色新增"), handle.Add)