43 lines
1 KiB
TypeScript
43 lines
1 KiB
TypeScript
|
|
import {
|
||
|
|
Controller,
|
||
|
|
Get,
|
||
|
|
Post,
|
||
|
|
Put,
|
||
|
|
Delete,
|
||
|
|
Route,
|
||
|
|
Security,
|
||
|
|
Tags,
|
||
|
|
Body,
|
||
|
|
Path,
|
||
|
|
Request,
|
||
|
|
Query,
|
||
|
|
} from "tsoa";
|
||
|
|
import { AppDataSource } from "../database/data-source";
|
||
|
|
import { Brackets, Not } from "typeorm";
|
||
|
|
import HttpSuccess from "../interfaces/http-success";
|
||
|
|
import HttpError from "../interfaces/http-error";
|
||
|
|
import HttpStatusCode from "../interfaces/http-status";
|
||
|
|
@Route("api/v1/kpi/report")
|
||
|
|
@Tags("Report")
|
||
|
|
@Security("bearerAuth")
|
||
|
|
export class ReportController extends Controller {
|
||
|
|
// private developmentScholarshipRepository = AppDataSource.getRepository(DevelopmentScholarship);
|
||
|
|
|
||
|
|
@Get("announcement/{id}")
|
||
|
|
async GetReportAnnouncement(@Path() id: string) {
|
||
|
|
const formattedData = {
|
||
|
|
announceYear: "๒๕๖๔",
|
||
|
|
roundNo: "1",
|
||
|
|
announceDate: "นาย",
|
||
|
|
oc: "พลสิทธิ์",
|
||
|
|
organizationName: "Chief Technology Officer",
|
||
|
|
};
|
||
|
|
|
||
|
|
return new HttpSuccess({
|
||
|
|
template: "announce",
|
||
|
|
reportName: "announce",
|
||
|
|
data: formattedData,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|