This commit is contained in:
2026-04-22 17:49:20 +08:00
parent a2fad4a095
commit f545aee45e
15 changed files with 268 additions and 140 deletions

View 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)
}
}

View File

@@ -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",