updated index.ts
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m22s
All checks were successful
Vercel Production Deployment / Deploy-Production (push) Successful in 1m22s
This commit is contained in:
parent
17c0c0e853
commit
ec752e0367
@ -4,12 +4,3 @@ import { sql } from '@vercel/postgres';
|
|||||||
import * as schema from './schema';
|
import * as schema from './schema';
|
||||||
|
|
||||||
export const db = drizzle(sql, { 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();
|
|
||||||
|
Loading…
Reference in New Issue
Block a user