Routen Fix

This commit is contained in:
2025-08-13 17:58:20 +02:00
parent 512a7af145
commit b9bfd433d1

View File

@@ -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);