优化鉴权

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

View File

@@ -21,9 +21,10 @@ func DictDataRoute(rg *gin.RouterGroup) {
// authSrv := NewSettingDictDataService(db)
handle := dictDataHandler{}
notAuth := rg.Group("/setting", middleware.LoginAuth())
notAuth.GET("/dict/data/all", handle.All)
rg = rg.Group("/setting", middleware.TokenAuth())
rg.GET("/dict/data/all", handle.All)
rg.GET("/dict/data/detail", handle.Detail)
rg.POST("/dict/data/add", handle.Add)
rg.POST("/dict/data/edit", handle.Edit)