mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 20:14:35 -04:00
fix username spelling from userName
Signed-off-by: Yannick Bungers <git@innay.de>
This commit is contained in:
parent
be27686610
commit
40103cb397
23 changed files with 89 additions and 91 deletions
|
@ -100,7 +100,7 @@ export class MediaController {
|
|||
// TODO: Move getting the Note object into a decorator
|
||||
const note: Note = await this.noteService.getNoteByIdOrAlias(noteId);
|
||||
this.logger.debug(
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.userName}'`,
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${user.username}'`,
|
||||
'uploadMedia',
|
||||
);
|
||||
const url = await this.mediaService.saveFile(file.buffer, user, note);
|
||||
|
@ -127,7 +127,7 @@ export class MediaController {
|
|||
@RequestUser() user: User,
|
||||
@Param('filename') filename: string,
|
||||
): Promise<void> {
|
||||
const username = user.userName;
|
||||
const username = user.username;
|
||||
try {
|
||||
this.logger.debug(
|
||||
`Deleting '${filename}' for user '${username}'`,
|
||||
|
@ -136,7 +136,7 @@ export class MediaController {
|
|||
const mediaUpload = await this.mediaService.findUploadByFilename(
|
||||
filename,
|
||||
);
|
||||
if (mediaUpload.user.userName !== username) {
|
||||
if (mediaUpload.user.username !== username) {
|
||||
this.logger.warn(
|
||||
`${username} tried to delete '${filename}', but is not the owner`,
|
||||
'deleteMedia',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue