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 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-02-27 23:11:41 +01:00
parent e60dee5015
commit cc25ac4e65

View file

@ -190,6 +190,6 @@ export const actions: Actions = {
} catch (e) { } catch (e) {
return fail(500, { error: (e as Error).message }); return fail(500, { error: (e as Error).message });
} }
redirect(303, `/products/${product.id}`); redirect(303, '/products');
} }
}; };