Routen Fix
This commit is contained in:
@@ -30,13 +30,13 @@ public class ServerController : Controller
|
||||
return View(vm);
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[HttpGet("AddServer")]
|
||||
public IActionResult AddServer()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[HttpPost("AddServer")]
|
||||
public async Task<IActionResult> AddServer(AddServerViewModel vm)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
@@ -58,7 +58,7 @@ public class ServerController : Controller
|
||||
return RedirectToAction(nameof(Overview));
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[HttpPost("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Delete(int id)
|
||||
{
|
||||
@@ -78,6 +78,7 @@ public class ServerController : Controller
|
||||
}
|
||||
|
||||
// GET: Server/Edit/5
|
||||
|
||||
public async Task<IActionResult> EditServer(int id)
|
||||
{
|
||||
var server = await _context.Servers.FindAsync(id);
|
||||
|
Reference in New Issue
Block a user