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