优化
This commit is contained in:
+4
-1
@@ -93,7 +93,10 @@ func (uc *APIUsecase) SyncAPIs(ctx context.Context, routes []*API) (*APISyncDiff
|
||||
}
|
||||
for _, item := range stored {
|
||||
storedKey := key(item)
|
||||
if routeSet[storedKey] == nil && !ignoreSet[storedKey] {
|
||||
// Ignoring an API removes it from the in-memory route comparison. If it
|
||||
// already exists in sys_apis, the reference implementation therefore
|
||||
// returns it in deleteApis while also returning it in ignoreApis.
|
||||
if routeSet[storedKey] == nil {
|
||||
diff.Deleted = append(diff.Deleted, item)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user