Skip to content

Commit

Permalink
Merge pull request #284 from codex-team/creator_id-property-add
Browse files Browse the repository at this point in the history
feat: New field in Note's schema
  • Loading branch information
DeadCreator authored Feb 5, 2025
2 parents f5f2379 + 9c14c3c commit a703367
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/presentation/http/router/note.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,10 @@ describe('Note API', () => {
tools: [headerTool, paragraphTool],
});

/** Check if response has createdAt and updatedAt fields */
/** Check if response has createdAt, updatedAt and creatorId fields */
expect(response?.json().note.createdAt).not.toBeNull();
expect(response?.json().note.updatedAt).not.toBeNull();
expect(response?.json().note.creatorId).to.be.equal(creator.id);
} else {
expect(response?.json()).toStrictEqual({
message: expectedMessage,
Expand Down
3 changes: 3 additions & 0 deletions src/presentation/http/schema/Note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@ export const NoteSchema = {
type: 'string',
format: 'date-time',
},
creatorId: {
type: 'number',
},
},
};

0 comments on commit a703367

Please sign in to comment.