Fix: handle paginated responses (items wrapper) for dms/automation/agents/ai hooks
This commit is contained in:
@@ -191,7 +191,7 @@ export function searchFiles(query: string): Promise<SearchResult> {
|
||||
}
|
||||
|
||||
export function getSharedWithMe(): Promise<DmsFile[]> {
|
||||
return apiGet<DmsFile[]>('/dms/shared-with-me');
|
||||
return apiGet<DmsFile[] | { items: DmsFile[] }>('/dms/shared-with-me').then(r => Array.isArray(r) ? r : r.items ?? []);
|
||||
}
|
||||
|
||||
export function fetchSharedWithMe(): Promise<DmsFile[]> {
|
||||
|
||||
Reference in New Issue
Block a user