fix: complete Velocity-OS feature migration wiring

This commit is contained in:
2026-05-02 22:42:26 +05:30
parent 8b2d836589
commit 600716a69d
19 changed files with 1050 additions and 123 deletions

View File

@@ -18,6 +18,14 @@ export function unwrapArray<T>(payload: unknown, keys: string[] = []): T[] {
if (Array.isArray(candidate)) return candidate as T[];
}
for (const key of ['data', 'result', 'payload', 'body']) {
const candidate = payload[key];
if (isRecord(candidate)) {
const nested = unwrapArray<T>(candidate, keys);
if (nested.length > 0) return nested;
}
}
return [];
}