Skip to content

Commit b87633d

Browse files
committed
update returns for assessment submission
1 parent ae59086 commit b87633d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

src/app/api/oa/[assessmentId]/submit/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function PUT(
99
try {
1010
const { assessmentId } = await params;
1111
await AssessmentService.submitAssessmentForCandidate(assessmentId);
12-
return Response.json({ data: null }, { status: 200 });
12+
return Response.json({ data: null }, { status: 201 });
1313
} catch (err) {
1414
return handleError(err);
1515
}

src/lib/api/candidate-assessment.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,6 @@ export async function submitCandidateAssessment(assessmentId: string): Promise<v
1818
if (!res.ok) {
1919
throw new Error(json.message);
2020
}
21+
22+
return json.data;
2123
}

0 commit comments

Comments
 (0)