Commit c8b4659c authored by Revant Nandgaonkar's avatar Revant Nandgaonkar

fix(identity-provider): Fix for avatar upload

Merge branch 'avatar-fix' into 'develop'

See merge request castlecraft/building-blocks!282
parents 740542d2 a80c4055
......@@ -10,8 +10,6 @@ import {
@EventsHandler(FileUploadedCloudBucketEvent)
export class FileUploadedCloudBucketHandler
implements IEventHandler<FileUploadedCloudBucketEvent> {
constructor() {}
async handle(event: FileUploadedCloudBucketEvent) {
const spacesEndpoint: any = new AWS.Endpoint(
event.storageSettings.endpoint,
......
......@@ -34,7 +34,7 @@ export class NewAvatarUploadedHandler
let profile: Profile = await this.profileService.findOne({
uuid: event.clientHttpRequest.token.sub,
});
if (profile && profile.picture) {
if (profile) {
profile.picture = this.getProfileUrl(event);
await profile.save();
return profile;
......
export const APP_NAME = 'identity_provider';
export const CLIENT_ID = 'client_id';
export const REDIRECT_URI = 'redirect_uri';
export const SILENT_REFRESH_REDIRECT_URI = 'silent_refresh_redirect_uri';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment