Skip to content

Commit 90e2598

Browse files
committed
Check if the waitpoint is COMPLETED already in the complete endpoint and return true
1 parent 46b3020 commit 90e2598

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

apps/webapp/app/routes/api.v1.waitpoints.tokens.$waitpointFriendlyId.complete.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ const { action, loader } = createActionApiRoute(
4545
throw json({ error: "Waitpoint not found" }, { status: 404 });
4646
}
4747

48-
// if (waitpoint.status === "COMPLETED") {
49-
// return json<CompleteWaitpointTokenResponseBody>({
50-
// success: true,
51-
// });
52-
// }
48+
if (waitpoint.status === "COMPLETED") {
49+
return json<CompleteWaitpointTokenResponseBody>({
50+
success: true,
51+
});
52+
}
5353

5454
const stringifiedData = await stringifyIO(body.data);
5555
const finalData = await conditionallyExportPacket(

0 commit comments

Comments
 (0)