Аватар
This commit is contained in:
@@ -53,9 +53,11 @@ public static class ProfilesEndpoints
|
||||
int.TryParse(form["y"], out int y);
|
||||
int.TryParse(form["width"], out int width);
|
||||
int.TryParse(form["height"], out int height);
|
||||
int.TryParse(form["sw"], out int sw);
|
||||
int.TryParse(form["sh"], out int sh);
|
||||
|
||||
using var stream = file.OpenReadStream();
|
||||
var result = await sender.Send(new CropAvatarCommand(userContext.UserId, stream, file.FileName ?? "avatar.jpg", file.ContentType, x, y, width, height), ct);
|
||||
var result = await sender.Send(new CropAvatarCommand(userContext.UserId, stream, file.FileName ?? "avatar.jpg", file.ContentType, x, y, width, height, sw, sh), ct);
|
||||
return result.IsSuccess ? Results.Ok(result.Value) : Results.NotFound(result.Error);
|
||||
}).DisableAntiforgery();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user