mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-24 03:57:06 -04:00
FilesystemBackend: Fix ESLint errors
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
56d28188e7
commit
05926c08d6
1 changed files with 7 additions and 3 deletions
|
@ -38,7 +38,7 @@ export class FilesystemBackend implements MediaBackend {
|
||||||
await fs.writeFile(filePath, buffer, null);
|
await fs.writeFile(filePath, buffer, null);
|
||||||
return ['/' + filePath, null];
|
return ['/' + filePath, null];
|
||||||
} catch (e) {
|
} 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}'`);
|
throw new MediaBackendError(`Could not save '${filePath}'`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ export class FilesystemBackend implements MediaBackend {
|
||||||
try {
|
try {
|
||||||
return await fs.unlink(filePath);
|
return await fs.unlink(filePath);
|
||||||
} catch (e) {
|
} 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}'`);
|
throw new MediaBackendError(`Could not delete '${filePath}'`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,11 @@ export class FilesystemBackend implements MediaBackend {
|
||||||
);
|
);
|
||||||
await fs.mkdir(this.uploadDirectory);
|
await fs.mkdir(this.uploadDirectory);
|
||||||
} catch (e) {
|
} 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(
|
throw new MediaBackendError(
|
||||||
`Could not create '${this.uploadDirectory}'`,
|
`Could not create '${this.uploadDirectory}'`,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue