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);
  }
}
