File tree Expand file tree Collapse file tree
examples/showcase/project-tracker/src/modules/projects Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 */
88
99import { ObjectHookDefinition } from '@objectql/types' ;
10+ import { Projects } from '../../types/projects' ;
1011
1112/**
1213 * Project Hooks - Business Logic Implementation
1314 *
1415 * This file implements all lifecycle hooks for the Project object.
1516 * Hooks are automatically triggered during CRUD operations.
1617 */
17- const hooks : ObjectHookDefinition = {
18+ const hooks : ObjectHookDefinition < Projects > = {
1819 /**
1920 * beforeCreate Hook
2021 *
@@ -42,7 +43,7 @@ const hooks: ObjectHookDefinition = {
4243 // Auto-assign owner from user context
4344 // Note: Framework automatically sets created_by, but we also need owner field
4445 if ( user ?. id ) {
45- data . owner = user . id ;
46+ data . owner = String ( user . id ) ;
4647 }
4748
4849 // Set default status to planned if not provided
You can’t perform that action at this time.
0 commit comments