Alpha Release 0.0.12 #98

Merged
niggl merged 76 commits from dev into main 2021-01-13 19:33:09 +00:00
Showing only changes of commit a2f4fd5d9b - Show all commits

View File

@ -1,11 +1,12 @@
import { Get, JsonController } from 'routing-controllers';
import { OpenAPI } from 'routing-controllers-openapi';
import { getConnection } from 'typeorm';
import { config } from '../config';
@JsonController('/status')
@JsonController()
export class StatusController {
@Get()
@Get('/status')
@OpenAPI({ description: "A very basic status/health endpoint that just checks if the database connection is available. <br> The available information depth will be expanded later." })
get() {
let connection;
@ -19,4 +20,12 @@ export class StatusController {
"database connection": "✔"
};
}
@Get('/version')
@OpenAPI({ description: "A very basic endpoint that just returns the curent package version." })
getVersion() {
return {
"version": config.version
}
}
}