示例#1
0
        public async Task <IActionResult> MarkAsCompleted(Guid id, [FromBody] MarkAsCompletedModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await WorkerServices.MarkJobOrderAsCompletedAsync(id, model);

            return(Ok());
        }
示例#2
0
 public async Task MarkJobOrderAsCompletedAsync(Guid jobOrderId, MarkAsCompletedModel model)
 {
     var userId  = GetCurrentUserId();
     var command = new MarkJobOrderAsCompletedCommand(userId, jobOrderId, model.DateOfCompletion);
     await Bus.Send(command);
 }