public IActionResult DoubleIng(int?input) { logsrv.AddNew("/doubling", "input" + input.ToString()); if (input != null) { return(Json(new { received = input, result = input * 2 })); } else { return(Json(new { error = "Please provide an input!" })); } }