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

added

parent 33634a56
No related branches found
No related tags found
1 merge request!4added vercel integration
......@@ -22,7 +22,7 @@ const FruitList = () => {
{fruits.length > 0 ? (
fruits.map((fruit, index) => (
<li key={index}>
Frucht: {fruit['German Name']}, Lateinischer Name: ({fruit['Latin Name']}), Farbe: {fruit.Color}, Herkunft: {fruit.Origin}, Kalorien pro 100g: {fruit.Calories}
Frucht: {fruit['German Name']}, Lateinischer Name: ({fruit['Latin Name']}), Farbe: {fruit.color}, Herkunft: {fruit.origin}, Kalorien pro 100g: {fruit.calories}
</li>
))
) : (
......
......@@ -2,7 +2,7 @@ import { sql } from '@vercel/postgres';
export default async function handler(request, response) {
try {
const { rows: fruits } = await sql`SELECT * FROM obst;`;
const { rows: fruits } = await sql`SELECT * FROM fruits;`;
return response.status(200).json(fruits);
} catch (error) {
console.error('Error during request processing:', error);
......
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