示例#1
0
 public IActionResult CorrectWord(WordManipulationViewModel input)
 {
     if (wordManipulator.UpdateWord(input.Word, input.WordCorrection, HttpContext.Connection.LocalIpAddress.MapToIPv4().ToString()))
     {
         return(RedirectToAction("ManipulateWordResult", new { message = $"Word '{input.Word}' corrected succesfully" }));
     }
     else
     {
         return(RedirectToAction("ManipulateWordResult", new { message = $"Could not correct word '{input.Word}'" }));
     }
 }
示例#2
0
        public void Put(int id, [FromBody] string value)
        {
            string ip = HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString();

            wordsManipulationService.UpdateWord(id, value, ip);
        }