Skip to content

Commit a91c6ac

Browse files
committed
fix record in create hook
1 parent 963c66a commit a91c6ac

File tree

1 file changed

+2
-2
lines changed
  • adminforth/documentation/docs/tutorial/03-Customization

1 file changed

+2
-2
lines changed

adminforth/documentation/docs/tutorial/03-Customization/04-hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ import type { AdminUser } from 'adminforth';
9696
//diff-add
9797
create: {
9898
//diff-add
99-
beforeSave: async ({ adminUser, updates }: { adminUser: AdminUser, updates: any }) => {
99+
beforeSave: async ({ adminUser, record }: { adminUser: AdminUser, record: any }) => {
100100
//diff-add
101-
updates.realtor_id = adminUser.dbUser.id;
101+
record.realtor_id = adminUser.dbUser.id;
102102
//diff-add
103103
return { ok: true };
104104
//diff-add

0 commit comments

Comments
 (0)