This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.

27 lines
533 B
TypeScript
Raw Normal View History

2024-10-08 15:32:02 +01:00
import { Controller, Get } from "elysia-decorators";
2024-10-19 04:10:44 +01:00
import { getAppVersion } from "../common/app.util";
2024-10-12 04:12:35 +01:00
import { AppService } from "../service/app.service";
2024-10-08 15:32:02 +01:00
2024-10-08 16:36:52 +01:00
@Controller()
2024-10-08 15:32:02 +01:00
export default class AppController {
2024-10-08 16:36:52 +01:00
@Get("/")
2024-10-16 07:47:52 +01:00
public async index() {
2024-10-08 15:32:02 +01:00
return {
app: "backend",
2024-10-16 07:47:52 +01:00
version: await getAppVersion(),
2024-10-08 15:32:02 +01:00
};
}
2024-10-12 04:12:35 +01:00
@Get("/health")
public async getHealth() {
return {
status: "OK",
};
}
2024-10-12 04:12:35 +01:00
@Get("/statistics")
public async getStatistics() {
return await AppService.getAppStatistics();
}
2024-10-08 15:32:02 +01:00
}