From b349d25bd791074727af1fc90547ab8724a37c57 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 3 Oct 2020 11:27:15 +0200 Subject: [PATCH] NotesService: Get metadata from database Signed-off-by: David Mehren Co-authored-by: Yannick Bungers --- src/notes/notes.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/notes/notes.service.ts b/src/notes/notes.service.ts index 8290bc04e..807c16d36 100644 --- a/src/notes/notes.service.ts +++ b/src/notes/notes.service.ts @@ -102,10 +102,10 @@ export class NotesService { // TODO: Convert DB UUID to base64 id: note.id, alias: note.alias, - title: NoteUtils.parseTitle(note), + title: note.title, // TODO: Get actual createTime createTime: new Date(), - description: NoteUtils.parseDescription(note), + description: note.description, editedBy: note.authorColors.map(authorColor => authorColor.user.userName), // TODO: Extract into method permissions: { @@ -119,7 +119,7 @@ export class NotesService { canEdit: noteGroupPermission.canEdit, })), }, - tags: NoteUtils.parseTags(note), + tags: note.tags.map(tag => tag.name), updateTime: (await this.getLastRevision(note)).createdAt, // TODO: Get actual updateUser updateUser: {