feat: add new config strategy to backend
This commit is contained in:
18
backend/src/config/config.controller.ts
Normal file
18
backend/src/config/config.controller.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Controller, Get } from "@nestjs/common";
|
||||
import { ConfigService } from "./config.service";
|
||||
import { ConfigDTO } from "./dto/config.dto";
|
||||
|
||||
@Controller("configs")
|
||||
export class ConfigController {
|
||||
constructor(private configService: ConfigService) {}
|
||||
|
||||
@Get()
|
||||
async list() {
|
||||
return new ConfigDTO().fromList(await this.configService.list())
|
||||
}
|
||||
|
||||
@Get("admin")
|
||||
async listForAdmin() {
|
||||
return await this.configService.listForAdmin();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user