mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
FilesystemBackend: Fix ESLint errors
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
0a23538389
commit
73db821649
1 changed files with 7 additions and 3 deletions
|
@ -38,7 +38,7 @@ export class FilesystemBackend implements MediaBackend {
|
|||
await fs.writeFile(filePath, buffer, null);
|
||||
return ['/' + filePath, null];
|
||||
} catch (e) {
|
||||
this.logger.error(e.message, e.stack, 'saveFile');
|
||||
this.logger.error((e as Error).message, (e as Error).stack, 'saveFile');
|
||||
throw new MediaBackendError(`Could not save '${filePath}'`);
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,7 @@ export class FilesystemBackend implements MediaBackend {
|
|||
try {
|
||||
return await fs.unlink(filePath);
|
||||
} catch (e) {
|
||||
this.logger.error(e.message, e.stack, 'deleteFile');
|
||||
this.logger.error((e as Error).message, (e as Error).stack, 'deleteFile');
|
||||
throw new MediaBackendError(`Could not delete '${filePath}'`);
|
||||
}
|
||||
}
|
||||
|
@ -73,7 +73,11 @@ export class FilesystemBackend implements MediaBackend {
|
|||
);
|
||||
await fs.mkdir(this.uploadDirectory);
|
||||
} catch (e) {
|
||||
this.logger.error(e.message, e.stack, 'deleteFile');
|
||||
this.logger.error(
|
||||
(e as Error).message,
|
||||
(e as Error).stack,
|
||||
'deleteFile',
|
||||
);
|
||||
throw new MediaBackendError(
|
||||
`Could not create '${this.uploadDirectory}'`,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue