added tons of features
This commit is contained in:
14
lib/db/prisma/sql/getUserWithAccount.sql
Normal file
14
lib/db/prisma/sql/getUserWithAccount.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
SELECT u.id,
|
||||
a.id AS profileId,
|
||||
IFNULL(a.role, 'CUSTOMER') AS role,
|
||||
IF(a.id IS NULL, FALSE, TRUE) AS isOauth,
|
||||
u.name,
|
||||
u.username,
|
||||
u.email,
|
||||
u.image,
|
||||
a.provider
|
||||
FROM users u
|
||||
LEFT JOIN accounts a
|
||||
ON a.user_id = u.id
|
||||
WHERE u.id = ?
|
||||
LIMIT 1;
|
||||
Reference in New Issue
Block a user