sending the host id in the get pqq details for am and corrected the error message in the submit pqq answer
This commit is contained in:
@@ -147,9 +147,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 pqqService.findHeaderByCompositeKey(
|
||||
|
||||
@@ -2051,6 +2051,19 @@ export class MinglarService {
|
||||
id: true,
|
||||
comments: true,
|
||||
pqqAnswerXid: true,
|
||||
activity: {
|
||||
select: {
|
||||
id: true,
|
||||
activityTitle: true,
|
||||
host: {
|
||||
select: {
|
||||
id: true,
|
||||
companyName: true,
|
||||
logoPath: true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
pqqQuestions: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -2120,6 +2133,9 @@ export class MinglarService {
|
||||
id: cat.id,
|
||||
categoryName: cat.categoryName,
|
||||
displayOrder: cat.displayOrder,
|
||||
hostId: item.activity.host.id,
|
||||
hostCompanyName: item.activity.host.companyName,
|
||||
hostLogoPath: item.activity.host.logoPath,
|
||||
pqqsubCategories: [],
|
||||
};
|
||||
} else if (!grouped[cat.id].activityPqqHeaderId) {
|
||||
|
||||
Reference in New Issue
Block a user