Skip to content

Commit bc1954c

Browse files
v2 routes in oss
1 parent 04a7385 commit bc1954c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

api/auth/user/UserRouter.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,18 @@ func (router UserRouterImpl) InitUserRouter(userAuthRouter *mux.Router) {
4141
HandlerFunc(router.userRestHandler.GetAllV2).Methods("GET")
4242
userAuthRouter.Path("/{id}").
4343
HandlerFunc(router.userRestHandler.GetById).Methods("GET")
44+
userAuthRouter.Path("v2/{id}").
45+
HandlerFunc(router.userRestHandler.GetById).Methods("GET") // v2 apis are opened for consistent dashboard handling, internally V1 methods are used
4446
userAuthRouter.Path("").
4547
HandlerFunc(router.userRestHandler.CreateUser).Methods("POST")
48+
userAuthRouter.Path("/v2").
49+
HandlerFunc(router.userRestHandler.CreateUser).Methods("POST") // v2 apis are opened for consistent dashboard handling, internally V1 methods are used
4650
userAuthRouter.Path("").
4751
HandlerFunc(router.userRestHandler.GetAll).Methods("GET")
4852
userAuthRouter.Path("").
4953
HandlerFunc(router.userRestHandler.UpdateUser).Methods("PUT")
54+
userAuthRouter.Path("/v2").
55+
HandlerFunc(router.userRestHandler.UpdateUser).Methods("PUT") // v2 apis are opened for consistent dashboard handling, internally V1 methods are used
5056
userAuthRouter.Path("/bulk").
5157
HandlerFunc(router.userRestHandler.BulkDeleteUsers).Methods("DELETE")
5258
userAuthRouter.Path("/{id}").
@@ -58,10 +64,16 @@ func (router UserRouterImpl) InitUserRouter(userAuthRouter *mux.Router) {
5864
HandlerFunc(router.userRestHandler.FetchRoleGroupsV2).Methods("GET")
5965
userAuthRouter.Path("/role/group/{id}").
6066
HandlerFunc(router.userRestHandler.FetchRoleGroupById).Methods("GET")
67+
userAuthRouter.Path("/role/group/v2/{id}").
68+
HandlerFunc(router.userRestHandler.FetchRoleGroupById).Methods("GET") // v2 apis are opened for consistent dashboard handling, internally V1 methods are used
6169
userAuthRouter.Path("/role/group").
6270
HandlerFunc(router.userRestHandler.CreateRoleGroup).Methods("POST")
71+
userAuthRouter.Path("/role/group/v2").
72+
HandlerFunc(router.userRestHandler.CreateRoleGroup).Methods("POST") // v2 apis are opened for consistent dashboard handling, internally V1 methods are used
6373
userAuthRouter.Path("/role/group").
6474
HandlerFunc(router.userRestHandler.UpdateRoleGroup).Methods("PUT")
75+
userAuthRouter.Path("/role/group/v2").
76+
HandlerFunc(router.userRestHandler.UpdateRoleGroup).Methods("PUT") // v2 apis are opened for consistent dashboard handling, internally V1 methods are used
6577
userAuthRouter.Path("/role/group").
6678
HandlerFunc(router.userRestHandler.FetchRoleGroups).Methods("GET")
6779
userAuthRouter.Path("/role/group/detailed/get").

0 commit comments

Comments
 (0)