Added profile ProfileColors and Profile images
This commit is contained in:
@@ -71,7 +71,7 @@ public class GoogleController(IIdentityService identityService, IHttpClientFacto
|
||||
user.Email,
|
||||
user.FirstName,
|
||||
user.LastName,
|
||||
user.PortraitUrl);
|
||||
user.ProfilePictureUrl);
|
||||
|
||||
return Ok(new { accessToken = token, email });
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ public class UpdateMyUser : EndpointGroupBase
|
||||
{
|
||||
app.MapGroup(this)
|
||||
.RequireAuthorization()
|
||||
.MapPost(UpdateCurrentUserProfilePicture, "/profile-picture")
|
||||
.MapPost(UpdateCurrentUserBannerPicture, "/banner-picture")
|
||||
.MapPost(UpdateCurrentUserWebsiteIcon, "/website-icon")
|
||||
.MapPatch("/profile", UpdateCurrentUser);
|
||||
}
|
||||
|
||||
@@ -16,5 +19,21 @@ public class UpdateMyUser : EndpointGroupBase
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUserProfilePicture(ISender sender, Stream stream)
|
||||
{
|
||||
var command = new UploadProfilePictureCommand { ProfilePicture = stream };
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUserBannerPicture(ISender sender, Stream stream)
|
||||
{
|
||||
var command = new UploadBannerPictureCommand { BannerPicture = stream };
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUserWebsiteIcon(ISender sender, Stream stream)
|
||||
{
|
||||
var command = new UploadWebsiteIconCommand { WebsiteIcon = stream };
|
||||
return await sender.Send(command);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user