mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-22 03:05:19 -04:00
Linting: Fixed wrong logger contexts
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
07a4de77d7
commit
b07c3be398
5 changed files with 7 additions and 7 deletions
|
@ -45,7 +45,7 @@ export class MediaController {
|
|||
const username = 'hardcoded';
|
||||
this.logger.debug(
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${username}'`,
|
||||
'uploadImage',
|
||||
'uploadMedia',
|
||||
);
|
||||
try {
|
||||
const url = await this.mediaService.saveFile(
|
||||
|
|
|
@ -101,7 +101,7 @@ export class MediaController {
|
|||
const username = req.user.userName;
|
||||
this.logger.debug(
|
||||
`Recieved filename '${file.originalname}' for note '${noteId}' from user '${username}'`,
|
||||
'uploadImage',
|
||||
'uploadMedia',
|
||||
);
|
||||
try {
|
||||
const url = await this.mediaService.saveFile(
|
||||
|
@ -142,7 +142,7 @@ export class MediaController {
|
|||
try {
|
||||
this.logger.debug(
|
||||
`Deleting '${filename}' for user '${username}'`,
|
||||
'deleteFile',
|
||||
'deleteMedia',
|
||||
);
|
||||
const mediaUpload = await this.mediaService.findUploadByFilename(
|
||||
filename,
|
||||
|
@ -150,7 +150,7 @@ export class MediaController {
|
|||
if (mediaUpload.user.userName !== username) {
|
||||
this.logger.warn(
|
||||
`${username} tried to delete '${filename}', but is not the owner`,
|
||||
'deleteFile',
|
||||
'deleteMedia',
|
||||
);
|
||||
throw new PermissionError(
|
||||
`File '${filename}' is not owned by '${username}'`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue