Ejemplo n.º 1
0
        public async Task <IActionResult> UpdateTeam([FromBody] UpdateTeam.Request request, Guid id)
        {
            request.Id        = id;
            request.AccountId = AccountId.GetValueOrDefault();
            request.ActionBy  = UserId.GetValueOrDefault();

            var result = await Mediator.Send(request);

            return(Respond(result));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> UpdateTeam(int id, UpdateTeam.Request request)
        {
            try {
                var response = await new UpdateTeam(_ctx).Do(id, request);
                if (response.Status)
                {
                    return(NoContent());
                }

                return(BadRequest(response.Message));
            } catch (TeamValidationException teamValidationException) {
                return(BadRequest(GetInnerMessage(teamValidationException)));
            }
        }