From 5fa3ebf148c910fbd4dcfe9f8da6e2f2dc53526b Mon Sep 17 00:00:00 2001 From: Tyler Howard <22920537+Tyler98ky@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:31:06 -0800 Subject: [PATCH] Fix SQL formatting convention (#390) --- dashboard/final-example/app/lib/data.ts | 2 +- dashboard/final-example/auth.ts | 2 +- dashboard/starter-example/app/lib/data.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/final-example/app/lib/data.ts b/dashboard/final-example/app/lib/data.ts index 028716db..6b052e5d 100644 --- a/dashboard/final-example/app/lib/data.ts +++ b/dashboard/final-example/app/lib/data.ts @@ -229,7 +229,7 @@ export async function fetchFilteredCustomers(query: string) { export async function getUser(email: string) { try { - const user = await sql`SELECT * from USERS where email=${email}`; + 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); diff --git a/dashboard/final-example/auth.ts b/dashboard/final-example/auth.ts index 30cd8fc3..3eb3a45e 100644 --- a/dashboard/final-example/auth.ts +++ b/dashboard/final-example/auth.ts @@ -8,7 +8,7 @@ import { authConfig } from './auth.config'; async function getUser(email: string): Promise { try { - const user = await sql`SELECT * from USERS where email=${email}`; + const user = await sql`SELECT * FROM users WHERE email=${email}`; return user.rows[0]; } catch (error) { console.error('Failed to fetch user:', error); diff --git a/dashboard/starter-example/app/lib/data.ts b/dashboard/starter-example/app/lib/data.ts index c25648f6..391c46ef 100644 --- a/dashboard/starter-example/app/lib/data.ts +++ b/dashboard/starter-example/app/lib/data.ts @@ -221,7 +221,7 @@ export async function fetchFilteredCustomers(query: string) { export async function getUser(email: string) { try { - const user = await sql`SELECT * from USERS where email=${email}`; + 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);