public async Task <IActionResult> MarkAsCompleted(Guid id, [FromBody] MarkAsCompletedModel model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await WorkerServices.MarkJobOrderAsCompletedAsync(id, model); return(Ok()); }
public async Task MarkJobOrderAsCompletedAsync(Guid jobOrderId, MarkAsCompletedModel model) { var userId = GetCurrentUserId(); var command = new MarkJobOrderAsCompletedCommand(userId, jobOrderId, model.DateOfCompletion); await Bus.Send(command); }