public async Task <HttpResult <ToggleMessageResponse> > Update(int id, ToggleUpdateMessageRequest request) { var retorno = new HttpResult <ToggleMessageResponse>(); if (id <= 0) { return(retorno.SetToUnprocessableEntity(ServiceConstants.IDENTIFICADOR_INVALIDO)); } if (request == null) { return(retorno.SetHttpStatusToBadRequest()); } var retornoTaskUpdate = ToggleServiceTask.Update(id, request.Description, request.Flag, request.IdsServiceRota); retorno.Response = MapToResponseToggleMessage.MapToToggleMessageResponse(retornoTaskUpdate.Result.Response); retorno.Message = retornoTaskUpdate.Result.Message; return(retorno); }
private Task <HttpResult <Toggle> > Update(int id, string description, bool flag, List <int> idsServiceRota) { return(task.Update(id, description, flag, idsServiceRota)); }