Updated the speaking evaluation to use the new endpoint

This commit is contained in:
Tiago Ribeiro
2023-09-18 13:17:33 +01:00
parent 3e010572f6
commit 4d364bd597

View File

@@ -29,8 +29,8 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
const snapshot = await uploadBytes(audioFileRef, binary);
const backendRequest = await axios.post(
`${process.env.BACKEND_URL}/speaking_task_1`,
{question: fields.question, answer: snapshot.metadata.fullPath},
`${process.env.BACKEND_URL}/speaking_task_3`,
{answers: [{question: fields.question, answer: snapshot.metadata.fullPath}]},
{
headers: {
Authorization: `Bearer ${process.env.BACKEND_JWT}`,