public async Task <IActionResult> UpdateMetadata([FromBody] AnswerMetadataUpdateViewModel model)
        {
            try
            {
                var response = await _service.UpdateAnswerMetadata(User, model, ModelState);

                return(response.JsonResult());
            }
            catch (Exception error)
            {
                _logger.Error(error);
                return(StandardResponse.ForError().JsonResult());
            }
        }
        public async Task <StandardResponse> UpdateAnswerMetadata(ClaimsPrincipal identity, AnswerMetadataUpdateViewModel model,
                                                                  ModelStateDictionary modelState)
        {
            if (!modelState.IsValid)
            {
                return(modelState.StandardError());
            }

            using (var db = new ServiceDb())
            {
                using (var user = await _userService.Become(db, identity, null))
                {
                    var metadata = await _answerService.UpdateAnswerMetadata(db, user, new UpdateAnswerMeta()
                    {
                        AnswerId   = model.AnswerId,
                        RowVersion = model.RowVersion,
                        Votes      = model.Votes,
                    });

                    await db.SaveChangesAsync();

                    return(StandardResponse.For(AnswerMetaViewModel.From(metadata)));
                }
            }
        }