mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
Merge pull request #46 from Hestia-Homes/main
Updated branding and added the new remote assessment feature
This commit is contained in:
commit
ee7dcbaf82
3 changed files with 21 additions and 23 deletions
BIN
public/domna_logo_blue_transparent_background.png
Normal file
BIN
public/domna_logo_blue_transparent_background.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 106 KiB |
|
|
@ -43,34 +43,32 @@ export async function POST(request: NextRequest) {
|
|||
}`,
|
||||
"Content-Type": "application/json",
|
||||
};
|
||||
// const response = await fetch(
|
||||
// `${process.env.FASTAPI_API_URL}/v1/plan/trigger`,
|
||||
// {
|
||||
// method: "POST",
|
||||
// headers: headers,
|
||||
// body: JSON.stringify(validatedBody),
|
||||
// }
|
||||
// );
|
||||
|
||||
// if (!response.ok) {
|
||||
// throw new Error("API request failed");
|
||||
// }
|
||||
|
||||
// const responseData = await response.json();
|
||||
|
||||
// return new NextResponse(JSON.stringify(responseData), {
|
||||
// status: 200,
|
||||
// });
|
||||
|
||||
console.log("Triggering plan with body: ", validatedBody);
|
||||
|
||||
// For the moment, we don't await any response from the backend, since we haven't split out the trigger
|
||||
fetch(`${process.env.FASTAPI_API_URL}/v1/plan/trigger`, {
|
||||
const url = `${process.env.FASTAPI_API_URL}/v1/plan/trigger`;
|
||||
console.log("Triggering plan with url: ", url);
|
||||
console.log("Triggering plan with headers: ", headers);
|
||||
|
||||
const response = await fetch(url, {
|
||||
method: "POST",
|
||||
headers: headers,
|
||||
body: JSON.stringify(validatedBody),
|
||||
});
|
||||
|
||||
console.log("Plan triggered successfully, status: %", response.statusText);
|
||||
if (!response.ok) {
|
||||
console.error("Error triggering plan:", response.statusText);
|
||||
return new NextResponse(
|
||||
JSON.stringify({ msg: "Error triggering plan" }),
|
||||
{
|
||||
status: 500,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
const data = await response.json();
|
||||
|
||||
return new NextResponse(JSON.stringify({ msg: "Job started" }), {
|
||||
status: 200,
|
||||
});
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ export default async function Home({
|
|||
<div className="w-full max-w-lg p-8 rounded-lg flex flex-col items-center justify-center">
|
||||
<Image
|
||||
className="mb-8"
|
||||
src="/HestiaLogoWhite.png"
|
||||
src="/domna_logo_blue_transparent_background.png"
|
||||
alt="Logo"
|
||||
height={200}
|
||||
width={200}
|
||||
height={300}
|
||||
width={300}
|
||||
/>
|
||||
<h1 className="text-4xl font-medium text-brandblue mb-8 text-center">
|
||||
Sign in to your account
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue