fixing response object

This commit is contained in:
Warunee Tamkoo 2024-09-05 17:26:52 +07:00
parent ba612f1b2b
commit fd76c6ee09
3 changed files with 11 additions and 13 deletions

View file

@ -179,12 +179,12 @@ export class ReportController extends Controller {
*/
@Get("expand")
async GetDataExpand() {
const lists = await this.personalRepository.find({
const data = await this.personalRepository.find({
select: ["personal_id"],
where: { probation_status: 7 },
});
return new HttpSuccess(lists);
return new HttpSuccess(data);
}
/**
@ -556,7 +556,7 @@ export class ReportController extends Controller {
*
*/
@Get("evaluate-commander")
async GetDataEvaluateCommander(@Query() id: string) {
async GetDataEvaluateCommander(@Query() id: string, @Request() request: RequestWithUser) {
const evaluate = await this.evaluateCommanderRepository.findOne({
where: { id },
});
@ -810,7 +810,7 @@ export class ReportController extends Controller {
*
*/
@Get("evaluate-chairman")
async GetDataEvaluateChairman(@Query() id: string) {
async GetDataEvaluateChairman(@Query() id: string, @Request() request: RequestWithUser) {
const evaluate = await this.evaluateChairmanRepository.findOne({
where: { id },
});