-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code cleanup goodies: file-scoped namespaces, default constructors, c…
…ollection initializers, etc.
- Loading branch information
Showing
123 changed files
with
4,752 additions
and
5,301 deletions.
There are no files selected for viewing
15 changes: 7 additions & 8 deletions
15
src/Isotope/Isotope/Areas/Admin/Controllers/AdminControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
using Isotope.Code.Utils.Filters; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Isotope.Areas.Admin.Controllers | ||
namespace Isotope.Areas.Admin.Controllers; | ||
|
||
/// <summary> | ||
/// Base class for all admin page controllers. | ||
/// </summary> | ||
[Area("Admin"), JwtAuthorize(true)] | ||
public class AdminControllerBase: Controller | ||
{ | ||
/// <summary> | ||
/// Base class for all admin page controllers. | ||
/// </summary> | ||
[Area("Admin"), JwtAuthorize(true)] | ||
public class AdminControllerBase: Controller | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 16 additions & 23 deletions
39
src/Isotope/Isotope/Areas/Admin/Controllers/HomeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,22 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace Isotope.Areas.Admin.Controllers | ||
namespace Isotope.Areas.Admin.Controllers; | ||
|
||
/// <summary> | ||
/// Base controller for bootstrapping the SPA page. | ||
/// </summary> | ||
[Route("~/@admin")] | ||
public class HomeController: ControllerBase | ||
{ | ||
/// <summary> | ||
/// Base controller for bootstrapping the SPA page. | ||
/// Hack to workaround regex not matching an empty string. | ||
/// </summary> | ||
[Route("~/@admin")] | ||
public class HomeController: ControllerBase | ||
{ | ||
/// <summary> | ||
/// Hack to workaround regex not matching an empty string. | ||
/// </summary> | ||
[Route("")] | ||
public IActionResult Index() | ||
{ | ||
return File("~/@assets/admin.html", "text/html"); | ||
} | ||
[Route("")] | ||
public IActionResult Index() => File("~/@assets/admin.html", "text/html"); | ||
|
||
/// <summary> | ||
/// Catch-all method for displaying SPA. | ||
/// </summary> | ||
[Route("{**path:regex(^(?!@))}")] | ||
public IActionResult Index(string path) | ||
{ | ||
return File("~/@assets/admin.html", "text/html"); | ||
} | ||
} | ||
} | ||
/// <summary> | ||
/// Catch-all method for displaying SPA. | ||
/// </summary> | ||
[Route("{**path:regex(^(?!@))}")] | ||
public IActionResult Index(string path) => File("~/@assets/admin.html", "text/html"); | ||
} |
Oops, something went wrong.