Allow static only classes and make Health.check() no longer async
This commit is contained in:
parent
85da5b630f
commit
c9ba6a6cc5
3 changed files with 6 additions and 3 deletions
|
|
@ -20,6 +20,9 @@
|
||||||
"recommended": true,
|
"recommended": true,
|
||||||
"suspicious": {
|
"suspicious": {
|
||||||
"noUnknownAtRules": "off"
|
"noUnknownAtRules": "off"
|
||||||
|
},
|
||||||
|
"complexity": {
|
||||||
|
"noStaticOnlyClass": "off"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"domains": {
|
"domains": {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import Elysia, { t } from "elysia";
|
import Elysia from "elysia";
|
||||||
import { health } from "./modules/health";
|
import { health } from "./modules/health";
|
||||||
|
|
||||||
export const app = new Elysia({ prefix: "/api" }).use(health);
|
export const app = new Elysia({ prefix: "/api" }).use(health);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import { HealthModel } from "./model";
|
import type { HealthModel } from "./model";
|
||||||
|
|
||||||
export abstract class Health {
|
export abstract class Health {
|
||||||
static async check() {
|
static check() {
|
||||||
return {
|
return {
|
||||||
status: "ok",
|
status: "ok",
|
||||||
} satisfies HealthModel["checkResponse"];
|
} satisfies HealthModel["checkResponse"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue