public async Task <IActionResult> RemoveRequirement(Guid vacancy, Guid clientId, Guid requirementId) { if (vacancy != Guid.Empty && clientId != Guid.Empty && requirementId != Guid.Empty) { var cmd = new RemoveRequirementCommand(requirementId, clientId, vacancy); var result = await _mediator.Send(cmd); if (result.IsFailure) { ViewBag.Notify = result.Error; // todo: toastr } } return(Ok()); }
public void Delete(RemoveRequirementCommand command) { _removeRequirementCommandHandler.Handle(command); }