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:
parent
e60dee5015
commit
cc25ac4e65
1 changed files with 1 additions and 1 deletions
|
|
@ -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');
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue