feature/34-status_health #36

Merged
niggl merged 2 commits from feature/34-status_health into dev 2020-12-18 22:02:36 +00:00
Showing only changes of commit cea5993049 - Show all commits

View File

@ -0,0 +1,23 @@
import { Get, JsonController } from 'routing-controllers';
import { OpenAPI } from 'routing-controllers-openapi';
import { getConnection } from 'typeorm';
@JsonController('/status')
export class StatusController {
@Get()
@OpenAPI({ description: "Lists all tracks." })
get() {
let connection;
try {
connection = getConnection();
}
catch {
throw new Error("sth is wrong, i can feel it....")
}
return {
"controllers": "✔",
"database connection": "✔"
}
}
}