Exemplo n.º 1
0
        public async Task <IActionResult> Edit([FromRoute] int id, [FromBody] EditTopicModel model)
        {
            if (model == null)
            {
                return(InvalidRequest());
            }

            model.ID = id;

            var result = await TopicService.Edit(model);

            if (result.Success)
            {
                return(Success(result.Data));
            }
            else
            {
                return(Error(result.ErrorMessage));
            }
        }