feat: 添加地图提示接口并修改时间地图请求方法
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

新增地图提示接口/maptip,同时将/timemap接口的请求方法从POST改为GET
This commit is contained in:
xinian
2026-03-01 09:28:00 +08:00
committed by cnb
parent f1a5b90ca5
commit 3656e43d3c
2 changed files with 20 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ func init() {
}
type TimeMapReq struct {
g.Meta `path:"/timemap" method:"POST"`
g.Meta `path:"/timemap" method:"GET"`
}
func (this *MapController) TimeMap(ctx context.Context, req *TimeMapReq) (res *cool.BaseRes, err error) {
@@ -33,3 +33,13 @@ func (this *MapController) TimeMap(ctx context.Context, req *TimeMapReq) (res *c
res.Data = service.NewMapService().GetTimeMap()
return res, nil
}
type MapTipReq struct {
g.Meta `path:"/maptip" method:"GET"`
}
func (this *MapController) MapTip(ctx context.Context, req *MapTipReq) (res *cool.BaseRes, err error) {
res = &cool.BaseRes{}
res.Data = service.NewMapService().GetTimeMap()
return res, nil
}