Skip to content

Commit

Permalink
Adjusted API post
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob-SA committed Apr 29, 2024
1 parent df7c07d commit 6d5a1f9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 8 additions & 5 deletions src/components/delivery/orderform.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,14 @@ function Orderform() {
};

try {
const response = await fetch("https://eoi9wdj8cv1ukqb.m.pipedream.net", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
const response = await fetch(
"https://dtu62597.eduhost.dk:10272/api/create/",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
}
);

if (response.ok) {
navigate("/confirmation"); // Navigate on successful submit
Expand Down
4 changes: 1 addition & 3 deletions src/components/header/NavigationBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ export default function NavigationBar() {
</li>
<div className={decideClass(Steps.Delivery) + "divider"}></div>
<li className={decideClass(Steps.Confirmation)}>
<Link className="bubble" to="/confirmation">
Confirmation
</Link>
<p className="bubble">Confirmation</p>
</li>
</ul>
</nav>
Expand Down

0 comments on commit 6d5a1f9

Please sign in to comment.