From 78adc42c761d79348d68ec03160a8ec3850ab416 Mon Sep 17 00:00:00 2001 From: Yuto Takano Date: Mon, 2 Dec 2024 12:58:39 +0100 Subject: [PATCH] Allow even empty names/descriptions for shop items in admin page, since SQlite has defaults --- src/routes/admin.items.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/routes/admin.items.tsx b/src/routes/admin.items.tsx index 4b4644e..026dff1 100644 --- a/src/routes/admin.items.tsx +++ b/src/routes/admin.items.tsx @@ -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); }