This commit is contained in:
2026-08-17 02:12:17 +08:00
parent 560ae46b82
commit 6a05803e08
96 changed files with 2888 additions and 685 deletions
+7 -1
View File
@@ -79,7 +79,13 @@ func (uc *APIUsecase) SyncAPIs(ctx context.Context, routes []*API) (*APISyncDiff
for _, item := range stored {
storedSet[key(item)] = item
}
diff := &APISyncDiff{Ignored: ignored}
// The sync API always returns JSON arrays for all three collections,
// including when no routes were added or removed.
diff := &APISyncDiff{
Added: make([]*API, 0),
Deleted: make([]*API, 0),
Ignored: ignored,
}
added := make(map[string]bool)
for _, item := range routes {
routeKey := key(item)