Skip to content

Commit

Permalink
chore: Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
aXenDeveloper committed Dec 7, 2024
1 parent 61ce786 commit 2465969
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class SignInAuthService {
language: true,
name_seo: true,
avatar_color: true,
joined_at: true,
},
});
if (!user?.password) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ export class UploadAvatarUserSettingsAuthService {
if (delete_avatar) return;
}

if (!avatar) {
throw new BadRequestException('No avatar provided');
}

const file = await this.filesHelper.upload({
file: avatar,
folder: 'avatars',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class CallbackSSOAuthService {
language: true,
name_seo: true,
avatar_color: true,
joined_at: true,
},
},
},
Expand Down Expand Up @@ -98,6 +99,7 @@ export class CallbackSSOAuthService {
name_seo: true,
avatar_color: true,
email_verified: true,
joined_at: true,
},
});
// If user exists, create SSO token and sign in
Expand Down Expand Up @@ -146,6 +148,7 @@ export class CallbackSSOAuthService {
avatar_color: '',
provider,
provider_id: data.id,
joined_at: new Date(),
};
}
}

0 comments on commit 2465969

Please sign in to comment.