Browse Source

Fixed routing and added links to dashboard

master
Teknikode 4 months ago
parent
commit
2b14547c25

+ 2
- 2
Teknik/Areas/Admin/Controllers/AdminController.cs View File

@@ -83,9 +83,9 @@ namespace Teknik.Areas.Admin.Controllers

[HttpGet]
[TrackPageView]
public IActionResult ShoretenedUrlSearch()
public IActionResult ShortenedUrlSearch()
{
UploadSearchViewModel model = new UploadSearchViewModel();
ShortenedUrlSearchViewModel model = new ShortenedUrlSearchViewModel();
return View(model);
}


+ 10
- 0
Teknik/Areas/Admin/Views/Admin/Dashboard.cshtml View File

@@ -15,6 +15,16 @@
<a href="@Url.SubRouteUrl("admin", "Admin.UploadSearch")">Upload Search</a>
</div>
</div>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<a href="@Url.SubRouteUrl("admin", "Admin.PasteSearch")">Paste Search</a>
</div>
</div>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<a href="@Url.SubRouteUrl("admin", "Admin.ShortenedUrlSearch")">Shortened Url Search</a>
</div>
</div>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<button type="button" class="btn btn-info" id="createInviteCode">Create Invite Code</button>

+ 14
- 0
Teknik/Routes.cs View File

@@ -114,6 +114,20 @@ namespace Teknik
template: "Search/Uploads",
defaults: new { area = "Admin", controller = "Admin", action = "UploadSearch" }
);
routes.MapSubdomainRoute(
name: "Admin.PasteSearch",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "admin" },
template: "Search/Pastes",
defaults: new { area = "Admin", controller = "Admin", action = "PasteSearch" }
);
routes.MapSubdomainRoute(
name: "Admin.ShortenedUrlSearch",
domains: new List<string>() { config.Host },
subDomains: new List<string>() { "admin" },
template: "Search/ShortenedUrls",
defaults: new { area = "Admin", controller = "Admin", action = "ShortenedUrlSearch" }
);
routes.MapSubdomainRoute(
name: "Admin.UserInfo",
domains: new List<string>() { config.Host },

Loading…
Cancel
Save