NoteEntity: Allow anonymous notes

Notes created by anonymous users don't have an owner.
This commit updates the entity accordingly.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-04-29 18:09:22 +02:00
parent bd56d17663
commit 0a8dd454ab
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
2 changed files with 6 additions and 5 deletions

View file

@ -152,7 +152,7 @@ describe('NotesService', () => {
expect(newNote.userPermissions).toHaveLength(0);
expect(newNote.groupPermissions).toHaveLength(0);
expect(newNote.tags).toHaveLength(0);
expect(newNote.owner).toBeUndefined();
expect(newNote.owner).toBeNull();
expect(newNote.alias).toBeNull();
});
it('without alias, with owner', async () => {
@ -177,7 +177,7 @@ describe('NotesService', () => {
expect(newNote.userPermissions).toHaveLength(0);
expect(newNote.groupPermissions).toHaveLength(0);
expect(newNote.tags).toHaveLength(0);
expect(newNote.owner).toBeUndefined();
expect(newNote.owner).toBeNull();
expect(newNote.alias).toEqual(alias);
});
it('with alias, with owner', async () => {