Commented a bit of code that is not yet ready
This commit is contained in:
@@ -26,11 +26,11 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|||||||
|
|
||||||
const binary = fs.readFileSync((audioFile as any).filepath).buffer;
|
const binary = fs.readFileSync((audioFile as any).filepath).buffer;
|
||||||
uploadBytes(audioFileRef, binary).then(async (snapshot) => {
|
uploadBytes(audioFileRef, binary).then(async (snapshot) => {
|
||||||
const backendRequest = await axios.post(`${process.env.BACKEND_URL}/writing_task2`, req.body as Body, {
|
// const backendRequest = await axios.post(`${process.env.BACKEND_URL}/speaking_task`, req.body as Body, {
|
||||||
headers: {
|
// headers: {
|
||||||
Authorization: `Bearer ${process.env.BACKEND_JWT}`,
|
// Authorization: `Bearer ${process.env.BACKEND_JWT}`,
|
||||||
},
|
// },
|
||||||
});
|
// });
|
||||||
|
|
||||||
fs.rmSync((audioFile as any).filepath);
|
fs.rmSync((audioFile as any).filepath);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user