bugs fixed

This commit is contained in:
daniel31x13
2023-12-30 09:31:53 -05:00
parent eee6a807da
commit 055869883a
4 changed files with 10 additions and 8 deletions
@@ -23,6 +23,7 @@ export default async function updateUserById(
id: userId,
},
});
if (ssoUser) {
// deny changes to SSO-defined properties
if (data.email !== user?.email) {
@@ -49,7 +50,7 @@ export default async function updateUserById(
status: 400,
};
}
if (data.image !== "") {
if (data.image?.startsWith("data:image/jpeg;base64")) {
return {
response: "SSO Users cannot change their avatar.",
status: 400,