diff --git a/dashboard/final-example/app/lib/data.ts b/dashboard/final-example/app/lib/data.ts index 5ca645b..c61293d 100644 --- a/dashboard/final-example/app/lib/data.ts +++ b/dashboard/final-example/app/lib/data.ts @@ -5,7 +5,6 @@ import { InvoiceForm, InvoicesTable, LatestInvoiceRaw, - User, Revenue, } from './definitions'; import { formatCurrency } from './utils'; @@ -226,13 +225,3 @@ export async function fetchFilteredCustomers(query: string) { throw new Error('Failed to fetch customer table.'); } } - -export async function getUser(email: string) { - try { - const user = await sql`SELECT * FROM users WHERE email=${email}`; - return user.rows[0] as User; - } catch (error) { - console.error('Failed to fetch user:', error); - throw new Error('Failed to fetch user.'); - } -} diff --git a/dashboard/starter-example/app/lib/data.ts b/dashboard/starter-example/app/lib/data.ts index 3e32426..141f2a8 100644 --- a/dashboard/starter-example/app/lib/data.ts +++ b/dashboard/starter-example/app/lib/data.ts @@ -5,7 +5,6 @@ import { InvoiceForm, InvoicesTable, LatestInvoiceRaw, - User, Revenue, } from './definitions'; import { formatCurrency } from './utils'; @@ -219,13 +218,3 @@ export async function fetchFilteredCustomers(query: string) { throw new Error('Failed to fetch customer table.'); } } - -export async function getUser(email: string) { - try { - const user = await sql`SELECT * FROM users WHERE email=${email}`; - return user.rows[0] as User; - } catch (error) { - console.error('Failed to fetch user:', error); - throw new Error('Failed to fetch user.'); - } -}