adjust upload
This commit is contained in:
@@ -5,8 +5,7 @@ import (
|
||||
|
||||
/******************** infra ********************/
|
||||
gs "simrs-vx/internal/infra/gorm-setting"
|
||||
synccfg "simrs-vx/internal/infra/sync-cfg"
|
||||
|
||||
simgosdb "simrs-vx/internal/infra/simgos-db"
|
||||
/******************** pkg ********************/
|
||||
cmw "simrs-vx/pkg/cors-manager-mw"
|
||||
lh "simrs-vx/pkg/lang-helper"
|
||||
@@ -15,9 +14,11 @@ import (
|
||||
|
||||
/******************** external ********************/
|
||||
a "github.com/karincake/apem"
|
||||
hk "github.com/karincake/hongkue"
|
||||
|
||||
/******************** internal ********************/
|
||||
"simrs-vx/internal/interface/main-handler/home"
|
||||
installation "simrs-vx/internal/interface/simgos-sync-handler/installation"
|
||||
)
|
||||
|
||||
func SetRoutes() http.Handler {
|
||||
@@ -25,12 +26,21 @@ func SetRoutes() http.Handler {
|
||||
a.RegisterExtCall(gs.Adjust)
|
||||
a.RegisterExtCall(zlc.Adjust)
|
||||
a.RegisterExtCall(lh.Populate)
|
||||
a.RegisterExtCall(synccfg.SetConfig)
|
||||
a.RegisterExtCall(simgosdb.SetInstance)
|
||||
|
||||
r := http.NewServeMux()
|
||||
|
||||
/******************** Main ********************/
|
||||
r.HandleFunc("/", home.Home)
|
||||
|
||||
/******************** Source ******************/
|
||||
prefix := "/new-to-old"
|
||||
hk.GroupRoutes(prefix+"/v1/installation", r, hk.MapHandlerFunc{
|
||||
"POST /": installation.O.Create,
|
||||
"POST /log": installation.O.CreateLog,
|
||||
"PATCH /{id}": installation.O.Update,
|
||||
"DELETE /{id}": installation.O.Delete,
|
||||
})
|
||||
|
||||
return cmw.SetCors(handlerlogger.SetLog(r))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user