From 53411dc5d9cd6800856e677e57726e4ddddc4559 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Thu, 9 Dec 2021 22:08:22 +0800 Subject: [PATCH] add perm --- src/webapi/router/router.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webapi/router/router.go b/src/webapi/router/router.go index a8c457e7..32179358 100644 --- a/src/webapi/router/router.go +++ b/src/webapi/router/router.go @@ -134,8 +134,8 @@ func configRoute(r *gin.Engine, version string) { pages.PUT("/user/:id/password", jwtAuth(), admin(), userPasswordPut) pages.DELETE("/user/:id", jwtAuth(), admin(), userDel) - pages.GET("/user-groups", jwtAuth(), user(), perm("/user-groups"), userGroupGets) - pages.POST("/user-groups", jwtAuth(), user(), userGroupAdd) + pages.GET("/user-groups", jwtAuth(), user(), userGroupGets) + pages.POST("/user-groups", jwtAuth(), user(), perm("/user-groups"), userGroupAdd) pages.GET("/user-group/:id", jwtAuth(), user(), userGroupGet) pages.PUT("/user-group/:id", jwtAuth(), user(), userGroupWrite(), userGroupPut) pages.DELETE("/user-group/:id", jwtAuth(), user(), userGroupWrite(), userGroupDel) @@ -143,8 +143,8 @@ func configRoute(r *gin.Engine, version string) { pages.DELETE("/user-group/:id/members", jwtAuth(), user(), userGroupWrite(), userGroupMemberDel) pages.GET("/user-group/:id/perm/:perm", jwtAuth(), user(), checkBusiGroupPerm) - pages.POST("/busi-groups", jwtAuth(), user(), perm("/busi-groups"), busiGroupAdd) pages.GET("/busi-groups", jwtAuth(), user(), busiGroupGets) + pages.POST("/busi-groups", jwtAuth(), user(), perm("/busi-groups"), busiGroupAdd) pages.GET("/busi-groups/alertings", jwtAuth(), busiGroupAlertingsGets) pages.GET("/busi-group/:id", jwtAuth(), user(), bgro(), busiGroupGet) pages.PUT("/busi-group/:id", jwtAuth(), user(), bgrw(), busiGroupPut)