Remove AuthorColor entity

It will be replaced with the Author entity,
that will save the color

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-05-17 21:08:13 +02:00
parent 0d6c300254
commit 81cc092e51
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
17 changed files with 7 additions and 98 deletions

View file

@ -60,13 +60,7 @@ export class NotesService {
async getUserNotes(user: User): Promise<Note[]> {
const notes = await this.noteRepository.find({
where: { owner: user },
relations: [
'owner',
'userPermissions',
'groupPermissions',
'authorColors',
'tags',
],
relations: ['owner', 'userPermissions', 'groupPermissions', 'tags'],
});
if (notes === undefined) {
return [];
@ -173,7 +167,6 @@ export class NotesService {
},
],
relations: [
'authorColors',
'owner',
'groupPermissions',
'groupPermissions.group',
@ -365,9 +358,7 @@ export class NotesService {
title: note.title ?? '',
createTime: (await this.getFirstRevision(note)).createdAt,
description: note.description ?? '',
editedBy: note.authorColors.map(
(authorColor) => authorColor.user.userName,
),
editedBy: [], // TODO temporary placeholder,
permissions: this.toNotePermissionsDto(note),
tags: this.toTagList(note),
updateTime: (await this.getLatestRevision(note)).createdAt,