All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m45s
19 lines
527 B
TypeScript
19 lines
527 B
TypeScript
import { Controller, Get, Post, Query, Route, Security, Tags } from "tsoa";
|
|
import { calculateGovAge } from "../interfaces/utils";
|
|
import HttpSuccess from "../interfaces/http-success";
|
|
|
|
@Route("/hello")
|
|
@Tags("Test")
|
|
@Security("bearerAuth")
|
|
export class AppController extends Controller {
|
|
@Get()
|
|
public async GET() {
|
|
return { message: "Hello World 1" };
|
|
}
|
|
|
|
@Post()
|
|
public async Post(@Query() profileId: string) {
|
|
const result = calculateGovAge(profileId, "OFFICER");
|
|
return new HttpSuccess(result);
|
|
}
|
|
}
|