diff --git a/src/presentation/http/router/note.test.ts b/src/presentation/http/router/note.test.ts index 606d38d7..2187fb53 100644 --- a/src/presentation/http/router/note.test.ts +++ b/src/presentation/http/router/note.test.ts @@ -2074,6 +2074,10 @@ describe('Note API', () => { createdAt: history.createdAt, content: history.content, tools: history.tools, + user: { + name: creator.name, + photo: creator.photo, + }, }, }); } diff --git a/src/presentation/http/schema/History.ts b/src/presentation/http/schema/History.ts index f9e18cb2..06a3378b 100644 --- a/src/presentation/http/schema/History.ts +++ b/src/presentation/http/schema/History.ts @@ -10,6 +10,7 @@ export const HistotyRecordShema = { 'userId', 'createdAt', 'tools', + 'user', ], properties: { id: { @@ -29,6 +30,19 @@ export const HistotyRecordShema = { type: 'string', format: 'date-time', }, + user: { + type: 'object', + properties: { + name: { + description: 'name of the user', + type: 'string', + }, + photo: { + description: 'photo of the user', + type: 'string', + }, + }, + }, content: { description: 'content of certain version of the note', type: 'object', @@ -69,6 +83,7 @@ export const HistoryMetaSchema = { 'id', 'userId', 'createdAt', + 'user', ], properties: { id: {