public async Task <IActionResult> Post([FromBody] FileRequest request, [FromServices] IUploadFileCommandAsync command) { if (!System.IO.File.Exists(request.Path)) { return(BadRequest(new { message = "Please provide a valid file path!" })); } await _executor.ExecuteCommandAsync(command, request); return(Ok("File uploaded")); }
public async Task <IActionResult> Post([FromBody] ProjectRequest dto, [FromServices] ICreateProjectCommandAsync command) { await _executor.ExecuteCommandAsync(command, dto); return(Ok()); }
public async Task <IActionResult> Post([FromBody] TaskRequest request, [FromServices] ICreateTaskCommandAsync command) { await _executor.ExecuteCommandAsync(command, request); return(Ok()); }