mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
refactor(note-metadata): do not embed User objects
This is part of an effort to consistently not embed User objects in API responses. Usernames are returned instead. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
96ed5f3cc8
commit
08f97209ec
5 changed files with 8 additions and 11 deletions
|
@ -790,7 +790,7 @@ describe('NotesService', () => {
|
|||
expect(metadataDto.tags).toHaveLength(1);
|
||||
expect(metadataDto.tags[0]).toEqual((await note.tags)[0].name);
|
||||
expect(metadataDto.updatedAt).toEqual(revisions[0].createdAt);
|
||||
expect(metadataDto.updateUser.username).toEqual(user.username);
|
||||
expect(metadataDto.updateUsername).toEqual(user.username);
|
||||
expect(metadataDto.viewCount).toEqual(note.viewCount);
|
||||
});
|
||||
});
|
||||
|
@ -896,7 +896,7 @@ describe('NotesService', () => {
|
|||
expect(noteDto.metadata.tags).toHaveLength(1);
|
||||
expect(noteDto.metadata.tags[0]).toEqual((await note.tags)[0].name);
|
||||
expect(noteDto.metadata.updatedAt).toEqual(revisions[0].createdAt);
|
||||
expect(noteDto.metadata.updateUser.username).toEqual(user.username);
|
||||
expect(noteDto.metadata.updateUsername).toEqual(user.username);
|
||||
expect(noteDto.metadata.viewCount).toEqual(note.viewCount);
|
||||
expect(noteDto.content).toEqual(content);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue