From 1bd4a13f7ff1e52777b1c94e031c3084ee088628 Mon Sep 17 00:00:00 2001 From: harid Date: Fri, 3 Jul 2026 16:17:06 +0700 Subject: [PATCH] fix --- src/controllers/ReportController.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index ed36f8f..bf0f31a 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -1248,8 +1248,8 @@ export class ReportController extends Controller { { probation_status: 9 }, ); - // 2) return data ให้ org ทำงานต่อ - return body.refIds.map((v) => ({ + // 2) return data ห่อใน result ให้ org ทำงานต่อ + const result = body.refIds.map((v) => ({ profileId: v.refId, commandId: v.commandId, amount: v.amount, @@ -1264,6 +1264,7 @@ export class ReportController extends Controller { commandName: v.commandName, remark: v.remark, })); + return { result }; } catch (error: any) { if (error instanceof HttpError) { throw error; @@ -1395,7 +1396,7 @@ export class ReportController extends Controller { ); // 2) return data ให้ org ทำงานต่อ - return body.refIds.map((v) => ({ + const result = body.refIds.map((v) => ({ profileId: v.refId, commandId: v.commandId, amount: v.amount, @@ -1411,6 +1412,7 @@ export class ReportController extends Controller { commandName: v.commandName, remark: v.remark, })); + return { result }; } catch (error: any) { if (error instanceof HttpError) { throw error;