mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Do not allow creation of entities from admin pages.
This commit is contained in:
@@ -37,29 +37,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Create
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/Create
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind(
|
||||
"Id,CanReadMediaSerial,Density,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,ModeSense6Data,ModeSense10Data")]
|
||||
TestedSequentialMedia testedSequentialMedia)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(testedSequentialMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user