public IActionResult Operation(int id, string op) { postServer.RecordDate(id); if (op == "plus") { postServer.PlusPostFre(id); } else if (op == "minus") { postServer.MinusPostFre(id); } return(RedirectToAction(nameof(Index))); }
public IActionResult Operation(string userName, int id, string op) { postServer.RecordDate(id); if (op == "plus") { postServer.PlusPostFre(id); } else if (op == "minus") { postServer.MinusPostFre(id); } return(Redirect($"/?username={userName}")); }