added approved filter and fixed the error messages
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user