kevin/add-form #14

Merged
fr merged 6 commits from kevin/add-form into main 2024-05-12 21:44:09 +02:00
Showing only changes of commit 630da41536 - Show all commits

View File

@ -46,8 +46,8 @@ export default function BeerAdd() {
});
const res = await req.json();
if (res.success & res.new_beer_id) {
window.location.href = `/beer/${res.new_beer_id}`;
if (res.code == 201 && res.data._id) {
window.location.href = `/beer/${res.data._id}`;
} else {
alert(
"Beer was not added successfully. Please check your data and try again.",