Merged PR 99: Add-logs-for-blob-storage-calls and verify file type and size into master
This commit is contained in:
@@ -14,24 +14,24 @@ public class UpdateMyUser : EndpointGroupBase
|
||||
.MapPatch("/profile", UpdateCurrentUser);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUser(ISender sender, UpdateCurrentUserCommand command)
|
||||
private static async Task<IResult> UpdateCurrentUser(ISender sender, UpdateCurrentUserCommand command)
|
||||
{
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUserProfilePicture(ISender sender, Stream stream, string url = "")
|
||||
private static async Task<IResult> UpdateCurrentUserProfilePicture(ISender sender, Stream stream, string url = "")
|
||||
{
|
||||
var command = new UploadProfilePictureCommand { ProfilePicture = stream, ProfilePictureUrl = url};
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUserBannerPicture(ISender sender, Stream stream, string url = "")
|
||||
private static async Task<IResult> UpdateCurrentUserBannerPicture(ISender sender, Stream stream, string url = "")
|
||||
{
|
||||
var command = new UploadBannerPictureCommand { BannerPicture = stream, BannerPictureUrl = url};
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UpdateCurrentUserWebsiteIcon(ISender sender, Stream stream, string url = "")
|
||||
private static async Task<IResult> UpdateCurrentUserWebsiteIcon(ISender sender, Stream stream, string url = "")
|
||||
{
|
||||
var command = new UploadWebsiteIconCommand { WebsiteIcon = stream, WebsitePictureUrl = url};
|
||||
return await sender.Send(command);
|
||||
|
||||
@@ -10,11 +10,10 @@ public class Users : EndpointGroupBase
|
||||
app.MapGroup(this)
|
||||
.MapPost(CreateUser)
|
||||
.MapPost(Login, "/login")
|
||||
.MapPost(UploadProfilePicture, "/upload-profile-picture")
|
||||
.MapGet(GetUser);
|
||||
}
|
||||
|
||||
private static async Task<Guid> CreateUser(ISender sender, CreateUserCommand command)
|
||||
private static async Task<IResult> CreateUser(ISender sender, CreateUserCommand command)
|
||||
{
|
||||
return await sender.Send(command);
|
||||
}
|
||||
@@ -28,11 +27,4 @@ public class Users : EndpointGroupBase
|
||||
{
|
||||
return await sender.Send(command);
|
||||
}
|
||||
|
||||
private static async Task<string> UploadProfilePicture(ISender sender, Stream stream)
|
||||
{
|
||||
var command = new UploadProfilePictureCommand { ProfilePicture = stream };
|
||||
|
||||
return await sender.Send(command);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user