mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
added some console logs and triggering rebuild as I didn't have environment variables in vercel
This commit is contained in:
parent
f383a26df4
commit
a1c0a8cdf0
2 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue