added some console logs and triggering rebuild as I didn't have environment variables in vercel

This commit is contained in:
Khalim Conn-Kowlessar 2023-08-03 10:56:59 +01:00
parent f383a26df4
commit a1c0a8cdf0
2 changed files with 4 additions and 5 deletions

View file

@ -11,7 +11,7 @@ const PresignedUrlBodySchema = z.object({
export async function POST(request: NextRequest) {
// For the moment, this api specifically handles uploads of csvs
console.log("in trigger api");
const body = await request.json();
let validatedBody;
@ -24,6 +24,8 @@ export async function POST(request: NextRequest) {
});
}
console.log("Validated body");
try {
// We'll trigger the plan build in our fastapi backend and then the user will just have to
// wait for the plan to be ready

View file

@ -57,17 +57,14 @@ const useCreatePlan = ({
trigger_file_path: fileKey,
});
const url = process.env.URL + "/api/plan/trigger";
console.log("Making request to: " + url);
const response = fetch(`/api/plan/trigger`, {
method: "POST",
body: body,
});
return response;
},
onError: (error) => {
console.log("Failed to upload file to S3.");
console.error(error);
},
}