mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-24 05:05: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:
@@ -8,7 +8,7 @@ import { authConfig } from './auth.config';
|
||||
|
||||
async function getUser(email: string): Promise<User | undefined> {
|
||||
try {
|
||||
const user = await sql<User>`SELECT * from USERS where email=${email}`;
|
||||
const user = await sql<User>`SELECT * FROM users WHERE email=${email}`;
|
||||
return user.rows[0];
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch user:', error);
|
||||
|
||||
Reference in New Issue
Block a user