summaryrefslogtreecommitdiff
path: root/lib/vendor-regular-registrations/handlers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vendor-regular-registrations/handlers.ts')
-rw-r--r--lib/vendor-regular-registrations/handlers.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/vendor-regular-registrations/handlers.ts b/lib/vendor-regular-registrations/handlers.ts
index 7490d81a..262d37ab 100644
--- a/lib/vendor-regular-registrations/handlers.ts
+++ b/lib/vendor-regular-registrations/handlers.ts
@@ -25,18 +25,25 @@ import { vendorAdditionalInfo, vendorRegularRegistrations } from '@/db/schema/ve
export async function registerVendorInternal(payload: {
registrationId: number;
requestData: RegistrationRequestData;
+ currentUser?: { // Cronjob 환경을 위한 유저 정보
+ id: string | number;
+ name?: string | null;
+ email?: string | null;
+ nonsapUserId?: string | null;
+ };
}) {
debugLog('[VendorRegistrationHandler] 정규업체 등록 핸들러 시작', {
registrationId: payload.registrationId,
companyName: payload.requestData.companyNameKor,
+ hasCurrentUser: !!payload.currentUser,
});
try {
// 1. MDG로 정규업체 등록 요청 데이터 전송
+ // sendSingleVendorToMDG 함수를 사용하여 vendors 테이블에서 데이터를 자동으로 조회
debugLog('[VendorRegistrationHandler] sendRegistrationRequestToMDG 호출');
const mdgResult = await sendRegistrationRequestToMDG(
- payload.registrationId,
- payload.requestData
+ payload.registrationId
);
if (!mdgResult.success) {