mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
AuthorshipEntity: Adjust to DB schema
This commit replaces the user property with a author property,
in accordance with the DB schema updated in 0d6c3002
.
It also adjusts the NoteService accordingly.
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
8040f47d00
commit
3d07c5e443
3 changed files with 25 additions and 11 deletions
|
@ -310,7 +310,7 @@ export class NotesService {
|
|||
// the user of that Authorship is the updateUser
|
||||
return lastRevision.authorships.sort(
|
||||
(a, b) => b.updatedAt.getTime() - a.updatedAt.getTime(),
|
||||
)[0].user;
|
||||
)[0].author.user;
|
||||
}
|
||||
// If there are no Authorships, the owner is the updateUser
|
||||
return note.owner;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue