Added a simple status controller

This commit is contained in:
Nicolai Ort 2021-01-30 17:47:34 +01:00
parent 4efb62921b
commit 1d62e7f14c
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import { Get, JsonController } from 'routing-controllers';
import { OpenAPI } from 'routing-controllers-openapi';
import { config } from '../config';
@JsonController()
export class StatusController {
@Get('/version')
@OpenAPI({ description: "A very basic endpoint that just returns the curent package version." })
getVersion() {
return {
"version": config.version
}
}
}