mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 06:34:39 -04:00
feat(note-metadata): replace primaryAlias with primaryAddress
The primary address is never null. If no alias is set, the id is returned. To still easily get the primary alias, the complete Alias DTOs are now included in the metadata. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
64b16c831e
commit
342efcd7b7
9 changed files with 50 additions and 21 deletions
|
@ -276,8 +276,8 @@ describe('Notes', () => {
|
|||
.get('/api/v2/notes/test5/metadata')
|
||||
.expect(200);
|
||||
expect(typeof metadata.body.id).toEqual('string');
|
||||
expect(metadata.body.aliases).toEqual(['test5']);
|
||||
expect(metadata.body.primaryAlias).toEqual('test5');
|
||||
expect(metadata.body.aliases[0].name).toEqual('test5');
|
||||
expect(metadata.body.primaryAddress).toEqual('test5');
|
||||
expect(metadata.body.title).toEqual('');
|
||||
expect(metadata.body.description).toEqual('');
|
||||
expect(typeof metadata.body.createdAt).toEqual('string');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue