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.

20 lines
430 B
TypeScript
Raw Normal View History

2024-10-08 15:32:02 +01:00
import { Controller, Get } from "elysia-decorators";
import { getAppVersion } from "../common/app-utils";
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-08 15:32:02 +01:00
public index() {
return {
app: "backend",
version: getAppVersion(),
};
}
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
}