Skip to content

Commit

Permalink
Allow setting 0 as item cost in admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
yutotakano committed Dec 2, 2024
1 parent ec7bf20 commit 0648ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/admin.items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export async function action({ request }: ActionFunctionArgs) {
}

if (method == "new") {
if (!name || !image_url || !description || !star_cost || !stock_count || !max_per_user) {
if (!name || !image_url || !description) {
session.flash("error", "All fields are required.");
return redirect("/admin/items", {
headers: {
Expand Down

0 comments on commit 0648ae2

Please sign in to comment.