mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
PrivateApi: Add config controller
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
9747ea209c
commit
86f5498f51
3 changed files with 80 additions and 2 deletions
25
src/api/private/config/config.controller.ts
Normal file
25
src/api/private/config/config.controller.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file)
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { Controller, Get } from '@nestjs/common';
|
||||
import { ConsoleLoggerService } from '../../../logger/console-logger.service';
|
||||
import { FrontendConfigService } from '../../../frontend-config/frontend-config.service';
|
||||
import { FrontendConfigDto } from '../../../frontend-config/frontend-config.dto';
|
||||
|
||||
@Controller('config')
|
||||
export class ConfigController {
|
||||
constructor(
|
||||
private readonly logger: ConsoleLoggerService,
|
||||
private frontendConfigService: FrontendConfigService,
|
||||
) {
|
||||
this.logger.setContext(ConfigController.name);
|
||||
}
|
||||
|
||||
@Get()
|
||||
async getFrontendConfig(): Promise<FrontendConfigDto> {
|
||||
return await this.frontendConfigService.getFrontendConfig();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue