Skip to content

Commit

Permalink
Allow even empty names/descriptions for shop items in admin page, sin…
Browse files Browse the repository at this point in the history
…ce SQlite has defaults
  • Loading branch information
yutotakano committed Dec 2, 2024
1 parent 0648ae2 commit 78adc42
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/routes/admin.items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,6 @@ export async function action({ request }: ActionFunctionArgs) {
}

if (method == "new") {
if (!name || !image_url || !description) {
session.flash("error", "All fields are required.");
return redirect("/admin/items", {
headers: {
"Set-Cookie": await commitSession(session),
},
});
}

// Add the item to the database
createShopItem(image_url, name, description, star_cost, stock_count, max_per_user);
}
Expand Down

0 comments on commit 78adc42

Please sign in to comment.