From cc25ac4e6573b9179fbc5800b3a1258c068ff7cd Mon Sep 17 00:00:00 2001 From: Piotr Oleszczyk Date: Fri, 27 Feb 2026 23:11:41 +0100 Subject: [PATCH] fix: redirect to product list after creating a product Previously redirected to /products/{id} (edit page) which looks identical to the create form, making it appear as if nothing happened. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/products/new/+page.server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/routes/products/new/+page.server.ts b/frontend/src/routes/products/new/+page.server.ts index 094b0a8..e86b51a 100644 --- a/frontend/src/routes/products/new/+page.server.ts +++ b/frontend/src/routes/products/new/+page.server.ts @@ -190,6 +190,6 @@ export const actions: Actions = { } catch (e) { return fail(500, { error: (e as Error).message }); } - redirect(303, `/products/${product.id}`); + redirect(303, '/products'); } };