feature: 自动关联可能的apiGroup

This commit is contained in:
pixelMax(奇淼
2024-07-26 11:15:02 +08:00
parent 4814f21017
commit 7ad6b9c32a
2 changed files with 26 additions and 4 deletions

View File

@@ -76,13 +76,16 @@ func (s *SystemApiApi) SyncApi(c *gin.Context) {
// @Success 200 {object} response.Response{msg=string} "获取API分组"
// @Router /api/getApiGroups [post]
func (s *SystemApiApi) GetApiGroups(c *gin.Context) {
groups, err := apiService.GetApiGroups()
groups, apiGroupMap, err := apiService.GetApiGroups()
if err != nil {
global.GVA_LOG.Error("获取失败!", zap.Error(err))
response.FailWithMessage("获取失败", c)
return
}
response.OkWithData(groups, c)
response.OkWithData(gin.H{
"groups": groups,
"apiGroupMap": apiGroupMap,
}, c)
}
// IgnoreApi