f
This commit is contained in:
17
app/main/api/internal/handler/app/getappconfighandler.go
Normal file
17
app/main/api/internal/handler/app/getappconfighandler.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"bdrp-server/app/main/api/internal/logic/app"
|
||||
"bdrp-server/app/main/api/internal/svc"
|
||||
"bdrp-server/common/result"
|
||||
)
|
||||
|
||||
func GetAppConfigHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
l := app.NewGetAppConfigLogic(r.Context(), svcCtx)
|
||||
resp, err := l.GetAppConfig()
|
||||
result.HttpResult(r, w, resp, err)
|
||||
}
|
||||
}
|
||||
@@ -899,6 +899,12 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
||||
|
||||
server.AddRoutes(
|
||||
[]rest.Route{
|
||||
{
|
||||
// 获取APP全局配置
|
||||
Method: http.MethodGet,
|
||||
Path: "/app/config",
|
||||
Handler: app.GetAppConfigHandler(serverCtx),
|
||||
},
|
||||
{
|
||||
Method: http.MethodGet,
|
||||
Path: "/app/version",
|
||||
|
||||
Reference in New Issue
Block a user