Skip to content

Commit b3d3f24

Browse files
committed
fix: resolve comment
1 parent 604c0b3 commit b3d3f24

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

adminforth/documentation/docs/tutorial/08-Plugins/03-ForeignInlineList.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ export default {
208208
resourceId: 'adminuser',
209209
//diff-add
210210
onDelete: 'cascade' // cascade or setNull
211-
//diff-add
212211
}
213212
}
214213
],

adminforth/modules/configValidator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export default class ConfigValidator implements IConfigValidator {
283283
}
284284

285285
const restApi = new AdminForthRestAPI (this.adminforth)
286-
await restApi.deleteWithCascade(res as AdminForthResource, recordId, { adminUser, response, body: null,});
286+
await restApi.deleteWithCascade(res as AdminForthResource, recordId, { adminUser, response});
287287

288288
await Promise.all(
289289
(res.hooks.delete.afterSave).map(

adminforth/modules/restApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
152152
}
153153
}
154154
}
155-
async deleteWithCascade(resource: AdminForthResource, primaryKey: any, context: {body: any, adminUser: any, response: any}) {
155+
async deleteWithCascade(resource: AdminForthResource, primaryKey: string, context: {adminUser: any, response: any}) {
156156
const { adminUser, response } = context;
157157

158158
const record = await this.adminforth.connectors[resource.dataSource].getRecordByPrimaryKey(resource, primaryKey);
@@ -1517,7 +1517,7 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI {
15171517
return { error };
15181518
}
15191519

1520-
await this.deleteWithCascade(resource, body.primaryKey, {body, adminUser, response});
1520+
await this.deleteWithCascade(resource, body.primaryKey, {adminUser, response});
15211521

15221522
const { error: deleteError } = await this.adminforth.deleteResourceRecord({
15231523
resource, record, adminUser, recordId: body['primaryKey'], response,

0 commit comments

Comments
 (0)