🪻 distributed transcription service thistle.dunkirk.sh

fix: allow audio playback for pending recordings

The audio endpoint now accepts both "pending" and "completed" status, allowing admins to preview pending recordings before transcription.

💘 Generated with Crush

Co-Authored-By: Crush <crush@charm.land>

dunkirk.sh 88bdffce 04562c8c

verified
Changed files
+7 -2
src
+7 -2
src/index.ts
···
);
}
-
if (transcription.status !== "completed") {
return Response.json(
-
{ error: "Transcription not completed yet" },
{ status: 400 },
);
}
···
);
}
+
// For pending recordings, audio file exists even though transcription isn't complete
+
// Allow audio access for pending and completed statuses
+
if (
+
transcription.status !== "completed" &&
+
transcription.status !== "pending"
+
) {
return Response.json(
+
{ error: "Audio not available yet" },
{ status: 400 },
);
}