Skip to content

Commit d2c0abb

Browse files
author
Chris Åkerfeldt Wendel
committed
feat: Show ProjectId in single mod result page, also redirect search results with single result to the page directly
1 parent 041a62a commit d2c0abb

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CFLookup/Pages/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
}
285285
else
286286
{
287-
<h2>@Model.FoundMod.Name</h2>
287+
<h2>@Model.FoundMod.Name</h2> <small style="color: #c3c3c3;">(Project Id: @Model.FoundMod.Id)</small>
288288
}
289289
<p><i>@Model.FoundMod.Summary</i></p>
290290
@if (Model.FoundGame != null)

CFLookup/Pages/Index.cshtml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public async Task<IActionResult> OnPostAsync()
211211
if (gameMods.Value.mods.Count == 1)
212212
{
213213
projectId = gameMods.Value.mods[0].Id;
214+
return Redirect($"~/{projectId}");
214215
}
215216
else
216217
{

0 commit comments

Comments
 (0)