OC LIB -> EXTRA
This commit is contained in:
@@ -218,7 +218,7 @@ func ExtractTokenInfo(request http.Request) (string, string, []string) {
|
||||
return "", "", []string{}
|
||||
}
|
||||
|
||||
func InitAPI(appName string) {
|
||||
func InitAPI(appName string, extraRoutes ...map[string][]string) {
|
||||
InitDaemon(appName)
|
||||
beego.BConfig.Listen.HTTPPort = config.GetConfig().APIPort
|
||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||
@@ -232,7 +232,7 @@ func InitAPI(appName string) {
|
||||
})
|
||||
beego.InsertFilter("*", beego.BeforeRouter, c)
|
||||
api := &tools.API{}
|
||||
api.Discovered(beego.BeeApp.Handlers.GetAllControllerInfo())
|
||||
api.Discovered(beego.BeeApp.Handlers.GetAllControllerInfo(), extraRoutes...)
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user