Fixing some small merge issues and ensure docker runs the backend properly

This commit is contained in:
Keith Stevens
2023-01-03 15:01:24 +09:00
parent a926703eec
commit dbfa77e8b7
6 changed files with 5 additions and 33 deletions
@@ -53,7 +53,7 @@ const handler = async (req, res) => {
});
// Update the backend with our Task ID
const ackRes = await fetch(`${process.env.FASTAPI_URL}/api/v1/tasks/${task.id}/ack`, {
await fetch(`${process.env.FASTAPI_URL}/api/v1/tasks/${task.id}/ack`, {
method: "POST",
headers: {
"X-API-Key": process.env.FASTAPI_KEY,
@@ -64,8 +64,6 @@ const handler = async (req, res) => {
}),
});
ackRes; // calling this only to get rid of the unused variable warning... not sure if anything is intended to be done with ackRes
// Send the results to the client.
res.status(200).json(registeredTask);
};
+1 -5
View File
@@ -7,8 +7,7 @@ import prisma from "src/lib/prismadb";
* This implicity does a few things:
* 1) Stores the answer with the Task Backend.
* 2) Records the new task in our local database.
* 3) (TODO) Acks the new task with our local task ID to the Task Backend.
* 4) Returns the newly created task to the client.
* 3) Returns the newly created task to the client.
*/
const handler = async (req, res) => {
const token = await getToken({ req });
@@ -69,9 +68,6 @@ const handler = async (req, res) => {
},
});
// TODO: Ack the task with the Task Backend using the newly created local
// task ID.
// Send the next task in the sequence to the client.
res.status(200).json(newRegisteredTask);
};