Files
hldrCenter/server/router/baseoverview/baseoverview.go
2025-11-03 09:28:49 +08:00

18 lines
658 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package baseoverview
import (
"github.com/JACKYMYPERSON/hldrCenter/config"
"github.com/JACKYMYPERSON/hldrCenter/internal/baseoverview/handler/baseOverview"
"github.com/gin-gonic/gin"
)
func BaseOverViewRouter(api *gin.RouterGroup, cfg *config.Config) {
baseOverviewapi := api.Group("/base-overview") // 用资源路径区分,避免与根路径冲突
{
// 获取基地概况(对应 service 中的 GET /
baseOverviewapi.GET("", gin.WrapH(baseOverview.GetBaseOverviewHandler(cfg)))
// 部分更新基地概况(对应 service 中的 PATCH /
baseOverviewapi.PATCH("", gin.WrapH(baseOverview.UpdateBaseOverviewPartialHandler(cfg)))
}
}