feat (user): add block and active
This commit is contained in:
@@ -54,7 +54,15 @@ func SetRoutes() http.Handler {
|
||||
// r.HandleFunc("POST /v1/authentication/logout", auth.Logout)
|
||||
hk.Route("POST /v1/authentication/logout", r, auth.GuardMW, auth.Logout)
|
||||
|
||||
hc.RegCrud(r, "/v1/user", user.O)
|
||||
hk.GroupRoutes("/v1/user", r, hk.MapHandlerFunc{
|
||||
"GET /": user.O.GetList,
|
||||
"GET /{id}": user.O.GetDetail,
|
||||
"POST /": user.O.Create,
|
||||
"PATCH /{id}": user.O.Update,
|
||||
"DELETE /{id}": user.O.Delete,
|
||||
"PATCH /{id}/block": user.O.Block,
|
||||
"PATCH /{id}/active": user.O.Active,
|
||||
})
|
||||
|
||||
/******************** sources ********************/
|
||||
hc.RegCrud(r, "/v1/division", division.O)
|
||||
|
||||
Reference in New Issue
Block a user