Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "eslint ."
},
"dependencies": {
"fumadocs-core": "^16.4.7",
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/adapters/objectstack-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ export class ObjectStackAdapter<T = any> implements DataSource<T> {
switch (operation) {
case 'create':
return this.client.data.createMany<T>(resource, data);
case 'delete':
case 'delete': {
const ids = data.map(item => (item as any).id).filter(Boolean);
await this.client.data.deleteMany(resource, ids);
return [];
case 'update':
}
case 'update': {
// For update, we need to handle each record individually
// or use the batch update if all records get the same changes
const results = await Promise.all(
Expand All @@ -138,6 +139,7 @@ export class ObjectStackAdapter<T = any> implements DataSource<T> {
)
);
return results;
}
default:
throw new Error(`Unsupported bulk operation: ${operation}`);
}
Expand Down