updated index.ts
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m22s

This commit is contained in:
christian 2024-05-24 12:11:23 +02:00
parent 17c0c0e853
commit ec752e0367

View File

@ -4,12 +4,3 @@ import { sql } from '@vercel/postgres';
import * as schema from './schema';
export const db = drizzle(sql, { schema });
export const allWines = await db.query.wines.findMany();
type NewWine = typeof schema.wines.$inferInsert;
export const insertWine = async (wine: NewWine) => {
return db.insert(schema.wines).values(wine).returning();
}
export const allProducers = await db.query.producers.findMany();