Skip to content
Snippets Groups Projects
Commit f29c19e1 authored by Tim-Luca Taxis's avatar Tim-Luca Taxis
Browse files

changed some language

parent edbb40e4
No related branches found
No related tags found
1 merge request!8added automatic FruitList
...@@ -36,14 +36,14 @@ const AddFruit = () => { ...@@ -36,14 +36,14 @@ const AddFruit = () => {
if (response.status === 409) { if (response.status === 409) {
const errorData = await response.json(); const errorData = await response.json();
console.error("Fruit already added"); console.error("Frucht schon vorhanden");
setError(errorData.error); setError(errorData.error);
return ; return ;
} }
if (!response.ok) { if (!response.ok) {
const errorData = await response.json(); const errorData = await response.json();
setError(errorData.error || 'Failed to add fruit'); setError(errorData.error || 'Fehler beim hinzufügen');
return; return;
} }
......
...@@ -18,7 +18,7 @@ export default async function handler(request, response) { ...@@ -18,7 +18,7 @@ export default async function handler(request, response) {
if (existingFruit.rows.length > 0) { if (existingFruit.rows.length > 0) {
return response.status(409).json({ error: 'Fruit already added '}); return response.status(409).json({ error: 'Frucht schon vorhanden'});
} }
const result = await sql` const result = await sql`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment