Skip to content

Commit 81127cb

Browse files
Copilothotlong
andcommitted
fix: type projects.hook.ts with ObjectHookDefinition<Projects> to fix CI build errors
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent a2be504 commit 81127cb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

examples/showcase/project-tracker/src/modules/projects/projects.hook.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
*/
88

99
import { 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

0 commit comments

Comments
 (0)