Removed unsued properties from user controller index

This commit is contained in:
Dimitar Todorov
2022-04-08 10:52:17 +03:00
parent 4e25e34b99
commit e1f462fb1d
13 changed files with 109 additions and 269 deletions

View File

@@ -70,6 +70,7 @@ namespace WebApp.Controllers
// GET: Cars/Edit/5
[HttpGet]
[Authorize(Roles = "Admin")]
public async Task<IActionResult> Edit(int? id)
{
if (id == null)
@@ -90,6 +91,7 @@ namespace WebApp.Controllers
// For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
[Authorize(Roles = "Admin")]
public async Task<IActionResult> Edit(int id, [Bind("Id, Brand, Model, Year, CountPassengerSeats, Description, PriceForDay")] Car car)
{
if (id != car.Id)
@@ -122,6 +124,7 @@ namespace WebApp.Controllers
// GET: Cars/Delete/5
[HttpGet]
[Authorize(Roles = "Admin")]
public async Task<IActionResult> Delete(int? id)
{
if (id == null)