mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00

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>
31 lines
906 B
TypeScript
31 lines
906 B
TypeScript
/*
|
|
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
|
*
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
import { Controller, Get, UseGuards } from '@nestjs/common';
|
|
import { MonitoringService } from '../../../monitoring/monitoring.service';
|
|
import { TokenAuthGuard } from '../../../auth/token-auth.guard';
|
|
import { ApiSecurity, ApiTags } from '@nestjs/swagger';
|
|
import { ServerStatusDto } from '../../../monitoring/server-status.dto';
|
|
|
|
@ApiTags('monitoring')
|
|
@ApiSecurity('token')
|
|
@Controller('monitoring')
|
|
export class MonitoringController {
|
|
constructor(private monitoringService: MonitoringService) {}
|
|
|
|
@UseGuards(TokenAuthGuard)
|
|
@Get()
|
|
getStatus(): Promise<ServerStatusDto> {
|
|
// TODO: toServerStatusDto.
|
|
return this.monitoringService.getServerStatus();
|
|
}
|
|
|
|
@UseGuards(TokenAuthGuard)
|
|
@Get('prometheus')
|
|
getPrometheusStatus(): string {
|
|
return '';
|
|
}
|
|
}
|