1
This commit is contained in:
@@ -4,10 +4,12 @@
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder app) => app.MapPost("/themes/upload", Handle).DisableAntiforgery();
|
||||
|
||||
|
||||
private async Task<IResult> Handle(IFormFile File, IMediator mediator, IMapper mapper, CancellationToken cancellationToken)
|
||||
internal record Request(
|
||||
string? Theme
|
||||
);
|
||||
private async Task<IResult> Handle([AsParameters] Request request, IFormFile File, IMediator mediator, IMapper mapper, CancellationToken cancellationToken)
|
||||
{
|
||||
var command = new UploadThemeCommand(File);
|
||||
var command = new UploadThemeCommand(File, request.Theme??"");
|
||||
var response = await mediator.Send(command, cancellationToken);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user