Skip to content

Commit a703367

Browse files
Merge pull request #284 from codex-team/creator_id-property-add
feat: New field in Note's schema
2 parents f5f2379 + 9c14c3c commit a703367

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/presentation/http/router/note.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,10 @@ describe('Note API', () => {
282282
tools: [headerTool, paragraphTool],
283283
});
284284

285-
/** Check if response has createdAt and updatedAt fields */
285+
/** Check if response has createdAt, updatedAt and creatorId fields */
286286
expect(response?.json().note.createdAt).not.toBeNull();
287287
expect(response?.json().note.updatedAt).not.toBeNull();
288+
expect(response?.json().note.creatorId).to.be.equal(creator.id);
288289
} else {
289290
expect(response?.json()).toStrictEqual({
290291
message: expectedMessage,

src/presentation/http/schema/Note.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,8 @@ export const NoteSchema = {
3737
type: 'string',
3838
format: 'date-time',
3939
},
40+
creatorId: {
41+
type: 'number',
42+
},
4043
},
4144
};

0 commit comments

Comments
 (0)