Added status controller

This commit is contained in:
Nicolai Ort 2021-03-01 17:25:12 +01:00
parent 124c7a5d15
commit aa286013a1
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import { Get, JsonController } from 'routing-controllers';
import { OpenAPI } from 'routing-controllers-openapi';
import { config } from '../config';
/**
* The statuscontroller provides simple endpoints concerning basic information about the server.
*/
@JsonController()
export class StatusController {
@Get('/version')
@OpenAPI({ description: "A very basic endpoint that just returns the curent package version." })
getVersion() {
return {
"version": config.version
}
}
}