fix issues #2428 #2383
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m5s

This commit is contained in:
harid 2026-04-16 15:59:36 +07:00
parent 57dc171997
commit e7a973b764
2 changed files with 6 additions and 4 deletions

View file

@ -15,6 +15,7 @@ import {
import HttpError from "../interfaces/http-error";
import HttpStatusCode from "../interfaces/http-status";
import { addLogSequence } from "../interfaces/utils";
import HttpSuccess from "../interfaces/http-success";
interface CachedToken {
token: string;
@ -88,7 +89,8 @@ export class ExRetirementController extends Controller {
},
});
return res.data;
// return res.data;
return new HttpSuccess(res.data.data);
} catch (error: any) {
if (error.response?.status === 500 && retryCount < maxRetries - 1) {
TokenCache.delete(`${clientId}:${clientSecret}`);

View file

@ -1433,10 +1433,10 @@ export class ProfileSalaryTempController extends Controller {
profileEmployeeId: x.profileEmployeeId,
dateStart: x.commandDateAffect,
dateEnd: null,
posNo: `${x.posNoAbb} ${x.posNo}`,
posNo: `${x.posNoAbb ?? ""} ${x.posNo ?? ""}`.trim(),
position: x.positionName,
commandId: x.commandId,
refCommandNo: `${x.commandNo}/${x.commandYear}`,
refCommandNo: [x.commandNo, x.commandYear].filter(Boolean).join("/") || undefined,
refCommandDate: x.commandDateAffect,
status: false,
isDeleted: false,
@ -1456,7 +1456,7 @@ export class ProfileSalaryTempController extends Controller {
dateStart: x.commandDateAffect,
dateEnd: null,
commandId: x.commandId,
commandNo: `${x.commandNo}/${x.commandYear}`,
commandNo: [x.commandNo, x.commandYear].filter(Boolean).join("/") || undefined,
commandName: x.commandName ?? "ให้ช่วยราชการ",
refCommandDate: x.commandDateSign,
refId: x.refId,