实现七月迭代公共技术基础
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 9m20s
This commit is contained in:
31
internal/routes/system_config.go
Normal file
31
internal/routes/system_config.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v2"
|
||||
|
||||
"github.com/break/junhong_cmp_fiber/internal/handler/admin"
|
||||
"github.com/break/junhong_cmp_fiber/internal/model/dto"
|
||||
"github.com/break/junhong_cmp_fiber/pkg/openapi"
|
||||
)
|
||||
|
||||
// registerSystemConfigRoutes 注册受控系统配置路由。
|
||||
func registerSystemConfigRoutes(router fiber.Router, handler *admin.SystemConfigHandler, doc *openapi.Generator, basePath string) {
|
||||
configs := router.Group("/system-configs")
|
||||
groupPath := basePath + "/system-configs"
|
||||
|
||||
Register(configs, doc, groupPath, "GET", "", handler.List, RouteSpec{
|
||||
Summary: "查询受控系统配置",
|
||||
Tags: []string{"系统配置"},
|
||||
Input: new(dto.SystemConfigListRequest),
|
||||
Output: new(dto.SystemConfigListResponse),
|
||||
Auth: true,
|
||||
})
|
||||
|
||||
Register(configs, doc, groupPath, "PUT", "/:key", handler.Update, RouteSpec{
|
||||
Summary: "更新受控系统配置",
|
||||
Tags: []string{"系统配置"},
|
||||
Input: new(dto.UpdateSystemConfigParams),
|
||||
Output: new(dto.SystemConfigItem),
|
||||
Auth: true,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user