mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 07:04:45 -04:00
fix(note): fix type for owner param
To make the create method easier to use in conjunction with the authentication framework, this commit changes the type of the `owner` parameter from `User | undefined` to `User | null`. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
c675dd0e9e
commit
b9d3c95d2d
14 changed files with 69 additions and 58 deletions
|
@ -91,7 +91,7 @@ export class NotesController {
|
|||
}
|
||||
this.logger.debug('Got raw markdown:\n' + text);
|
||||
return await this.noteService.toNoteDto(
|
||||
await this.noteService.createNote(text, undefined, user),
|
||||
await this.noteService.createNote(text, user),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ export class NotesController {
|
|||
this.logger.debug('Got raw markdown:\n' + text, 'createNamedNote');
|
||||
try {
|
||||
return await this.noteService.toNoteDto(
|
||||
await this.noteService.createNote(text, noteAlias, user),
|
||||
await this.noteService.createNote(text, user, noteAlias),
|
||||
);
|
||||
} catch (e) {
|
||||
if (e instanceof AlreadyInDBError) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue