mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
Enforce explicit function return types
This re-enables the `@typescript-eslint/explicit-module-boundary-types` check and also enables the `@typescript-eslint/explicit-function-return-type` check. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
05926c08d6
commit
b128efebff
15 changed files with 59 additions and 42 deletions
|
@ -53,7 +53,7 @@ export class TokensController {
|
|||
|
||||
@Delete('/:keyId')
|
||||
@HttpCode(204)
|
||||
async deleteToken(@Param('keyId') keyId: string) {
|
||||
async deleteToken(@Param('keyId') keyId: string): Promise<void> {
|
||||
return await this.authService.removeToken(keyId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,10 @@ export class MeController {
|
|||
@UseGuards(TokenAuthGuard)
|
||||
@Delete('history/:note')
|
||||
@HttpCode(204)
|
||||
deleteHistoryEntry(@Req() req: Request, @Param('note') note: string) {
|
||||
deleteHistoryEntry(
|
||||
@Req() req: Request,
|
||||
@Param('note') note: string,
|
||||
): Promise<void> {
|
||||
// ToDo: Check if user is allowed to delete note
|
||||
try {
|
||||
return this.historyService.deleteHistoryEntry(note, req.user);
|
||||
|
|
|
@ -25,7 +25,7 @@ export class MonitoringController {
|
|||
|
||||
@UseGuards(TokenAuthGuard)
|
||||
@Get('prometheus')
|
||||
getPrometheusStatus() {
|
||||
getPrometheusStatus(): string {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ export const MarkdownBody = createParamDecorator(
|
|||
}
|
||||
},
|
||||
[
|
||||
(target, key) => {
|
||||
(target, key): void => {
|
||||
ApiConsumes('text/markdown')(
|
||||
target,
|
||||
key,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue