feat (crud): add person, person-contact, person-address
This commit is contained in:
@@ -5,6 +5,11 @@ import (
|
||||
|
||||
/******************** main / transaction ********************/
|
||||
auth "simrs-vx/internal/interface/main-handler/authentication"
|
||||
|
||||
/******************** actor ********************/
|
||||
person "simrs-vx/internal/interface/main-handler/person"
|
||||
personaddress "simrs-vx/internal/interface/main-handler/person-address"
|
||||
personcontact "simrs-vx/internal/interface/main-handler/person-contact"
|
||||
user "simrs-vx/internal/interface/main-handler/user"
|
||||
|
||||
/******************** external ********************/
|
||||
@@ -54,6 +59,7 @@ func SetRoutes() http.Handler {
|
||||
// r.HandleFunc("POST /v1/authentication/logout", auth.Logout)
|
||||
hk.Route("POST /v1/authentication/logout", r, auth.GuardMW, auth.Logout)
|
||||
|
||||
/******************** actor ********************/
|
||||
hk.GroupRoutes("/v1/user", r, hk.MapHandlerFunc{
|
||||
"GET /": user.O.GetList,
|
||||
"GET /{id}": user.O.GetDetail,
|
||||
@@ -63,6 +69,9 @@ func SetRoutes() http.Handler {
|
||||
"PATCH /{id}/block": user.O.Block,
|
||||
"PATCH /{id}/active": user.O.Active,
|
||||
})
|
||||
hc.RegCrud(r, "/v1/person", person.O)
|
||||
hc.RegCrud(r, "/v1/person-address", personaddress.O)
|
||||
hc.RegCrud(r, "/v1/person-contact", personcontact.O)
|
||||
|
||||
/******************** sources ********************/
|
||||
hc.RegCrud(r, "/v1/division", division.O)
|
||||
|
||||
Reference in New Issue
Block a user