enable modifying profile settings for SSO users
This commit is contained in:
@@ -32,19 +32,13 @@ export default async function verifyUser({
|
||||
subscriptions: true,
|
||||
},
|
||||
});
|
||||
const ssoUser = await prisma.account.findFirst({
|
||||
where: {
|
||||
userId: userId,
|
||||
},
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
res.status(404).json({ response: "User not found." });
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!user.username && !ssoUser) {
|
||||
// SSO users don't need a username
|
||||
if (!user.username) {
|
||||
res.status(401).json({
|
||||
response: "Username not found.",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user