mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
fix: services use the new typings from create methods
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
b896f954b9
commit
d18d23cb16
4 changed files with 15 additions and 11 deletions
|
@ -61,17 +61,17 @@ export class AliasService {
|
|||
`The alias '${alias}' is already a public id.`,
|
||||
);
|
||||
}
|
||||
let newAlias: Alias;
|
||||
let newAlias;
|
||||
if (note.aliases.length === 0) {
|
||||
// the first alias is automatically made the primary alias
|
||||
newAlias = Alias.create(alias, true);
|
||||
newAlias = Alias.create(alias, note, true);
|
||||
} else {
|
||||
newAlias = Alias.create(alias);
|
||||
newAlias = Alias.create(alias, note);
|
||||
}
|
||||
note.aliases.push(newAlias);
|
||||
note.aliases.push(newAlias as Alias);
|
||||
|
||||
await this.noteRepository.save(note);
|
||||
return newAlias;
|
||||
return newAlias as Alias;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue