added approved filter and fixed the error messages

This commit is contained in:
2026-01-07 19:13:36 +05:30
parent e65ed8babc
commit 16c901b64b
2 changed files with 7 additions and 3 deletions

View File

@@ -156,9 +156,9 @@ export const handler = safeHandler(async (event: APIGatewayProxyEvent): Promise<
const pqqAnswerXid = Number(fields.pqqAnswerXid);
const comments = fields.comments || null;
if (!activityXid || isNaN(activityXid)) throw new ApiError(400, "Valid activityXid is required");
if (!pqqQuestionXid || isNaN(pqqQuestionXid)) throw new ApiError(400, "Valid pqqQuestionXid is required");
if (!pqqAnswerXid || isNaN(pqqAnswerXid)) throw new ApiError(400, "Valid pqqAnswerXid is required");
if (!activityXid || isNaN(activityXid)) throw new ApiError(400, "Please provide a valid activity");
if (!pqqQuestionXid || isNaN(pqqQuestionXid)) throw new ApiError(400, "Please select a valid question");
if (!pqqAnswerXid || isNaN(pqqAnswerXid)) throw new ApiError(400, "Please select a valid answer");
// 6) UPSERT header
const existingHeader = await hostService.findHeaderByCompositeKey(

View File

@@ -839,6 +839,10 @@ export class MinglarService {
internal: MINGLAR_STATUS_INTERNAL.AM_REJECTED,
display: MINGLAR_STATUS_DISPLAY.ENHANCING,
},
Approved: {
internal: MINGLAR_STATUS_INTERNAL.AM_APPROVED,
display: MINGLAR_STATUS_DISPLAY.APPROVED,
}
};
if (applicationStatus?.trim()) {