fix
This commit is contained in:
@@ -88,6 +88,16 @@ func (s *AccessService) PolicyPathResponses(ctx context.Context, authorityID uin
|
||||
func (s *AccessService) SyncAPIResponses(ctx context.Context, routes []dto.APIRequest) (*dto.APISyncResponse, error) {
|
||||
items := make([]*biz.API, 0, len(routes))
|
||||
for i := range routes {
|
||||
routes[i].Path = s.NormalizeRoutePath(routes[i].Path)
|
||||
if routes[i].APIGroup == "" || routes[i].Description == "" {
|
||||
group, description := routeMetadata(routes[i].Method, routes[i].Path)
|
||||
if routes[i].APIGroup == "" {
|
||||
routes[i].APIGroup = group
|
||||
}
|
||||
if routes[i].Description == "" {
|
||||
routes[i].Description = description
|
||||
}
|
||||
}
|
||||
items = append(items, apiDomain(&routes[i]))
|
||||
}
|
||||
return s.SyncAPIs(ctx, items)
|
||||
|
||||
Reference in New Issue
Block a user