aboutsummaryrefslogtreecommitdiff
path: root/src/routes/+page.server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/+page.server.ts')
-rw-r--r--src/routes/+page.server.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts
index 55ac82d..0a8a3f4 100644
--- a/src/routes/+page.server.ts
+++ b/src/routes/+page.server.ts
@@ -40,7 +40,7 @@ export const actions: Actions = {
const categoryId = data.get('category_id')?.toString() || null;
if (!name) {
- return fail(400, { error: 'Name is required' });
+ return fail(400, { error: 'Le nom est requis' });
}
const [existing] = await db
@@ -77,7 +77,7 @@ export const actions: Actions = {
.from(groceries)
.where(eq(groceries.id, id));
if (!item) {
- return fail(404, { error: 'Item not found' });
+ return fail(404, { error: 'Article introuvable' });
}
await db
@@ -94,7 +94,7 @@ export const actions: Actions = {
const categoryId = data.get('category_id')?.toString() || null;
if (!name) {
- return fail(400, { error: 'Name is required' });
+ return fail(400, { error: 'Le nom est requis' });
}
const [existing] = await db