mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
refactor(alias): lazy-load relations
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
facdc456cd
commit
9e608c75d3
1 changed files with 2 additions and 2 deletions
|
@ -49,7 +49,7 @@ export class Alias {
|
|||
@ManyToOne((_) => Note, (note) => note.aliases, {
|
||||
onDelete: 'CASCADE', // This deletes the Alias, when the associated Note is deleted
|
||||
})
|
||||
note: Note;
|
||||
note: Promise<Note>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
private constructor() {}
|
||||
|
@ -58,7 +58,7 @@ export class Alias {
|
|||
const alias = new Alias();
|
||||
alias.name = name;
|
||||
alias.primary = primary;
|
||||
alias.note = note;
|
||||
alias.note = Promise.resolve(note);
|
||||
return alias;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue