mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-11 09:51:47 +00:00
Co-authored-by: Tyler Howard <22920537+Tyler98ky@users.noreply.github.com> Co-authored-by: Delba de Oliveira <32464864+delbaoliveira@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user