BAGUETTE 🍞

This commit is contained in:
Victor Turgeon 2022-11-08 07:43:48 -05:00
parent 33596177f6
commit 5f4a488274
2 changed files with 4 additions and 17 deletions

View File

@ -52,7 +52,7 @@ const App = () => {
<Route path="formulaire" element={<Formulaire />} />
<Route path="myinvoices" element={<MyInvoices />} />
<Route path="invoices" element={<Invoices />} />
<Route path="reviewinvoice/:id" element={<ReviewInvoice />} />
<Route path="reviewinvoice" element={<ReviewInvoice />} />
</Route>
</Routes>
</BrowserRouter>

View File

@ -63,21 +63,8 @@ export default function App() {
data.prodQuant[`${p.id}`] = p.quantity;
});
const jsonData = JSON.stringify(data);
console.log(jsonData);
fetch("https://localhost:7292/api/Invoice", {
mode: "cors",
method: "POST",
credentials: "include",
headers:{
'Content-Type': 'application/json'
},
body: jsonData
}).then((response) => {
console.log(response);
});
cookies.set('invoice', data, { path: '/', SameSite: 'strict', secure: true, maxAge: 2592000 });
navigate("/reviewinvoice");
}
}