mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 08:50:56 +01:00
20 lines
471 B
TypeScript
20 lines
471 B
TypeScript
|
|
import { Controller, Get, Inject } from "@nestjs/common";
|
||
|
|
|
||
|
|
import { AppService } from "./app.service";
|
||
|
|
|
||
|
|
@Controller()
|
||
|
|
export class AppController {
|
||
|
|
// @ts-expect-error decorators are not correctly handled yet
|
||
|
|
constructor(@Inject(AppService) private readonly appService: AppService) {}
|
||
|
|
|
||
|
|
@Get()
|
||
|
|
async getHello(): Promise<string> {
|
||
|
|
return await this.appService.getHello();
|
||
|
|
}
|
||
|
|
|
||
|
|
@Get("/random")
|
||
|
|
getRandom(): string {
|
||
|
|
return Math.random().toString();
|
||
|
|
}
|
||
|
|
}
|