enable modifying profile settings for SSO users

This commit is contained in:
daniel31x13
2024-05-12 22:28:34 -04:00
parent 861f8e55f4
commit 65b29830f0
4 changed files with 117 additions and 152 deletions
+1 -7
View File
@@ -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.",
});