Browse Source
Merge pull request #21189 from abpframework/docs-patch
Use `Redirect` instead of `RedirectToPage`.
pull/21199/head
SALİH ÖZKARA
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
modules/docs/src/Volo.Docs.Web/Pages/Documents/Index.cshtml.cs
|
|
|
@ -29,14 +29,14 @@ namespace Volo.Docs.Pages.Documents |
|
|
|
{ |
|
|
|
if (_uiOptions.SingleProjectMode.Enable) |
|
|
|
{ |
|
|
|
return RedirectToPage("/Documents/Project/Index", new {version = DocsAppConsts.Latest }); |
|
|
|
return Redirect($"/Documents/Project/Index?version={DocsAppConsts.Latest}"); |
|
|
|
} |
|
|
|
|
|
|
|
var listResult = await _projectAppService.GetListAsync(); |
|
|
|
|
|
|
|
if (listResult.Items.Count == 1) |
|
|
|
{ |
|
|
|
return RedirectToPage("/Documents/Project/Index", new { shortName = listResult.Items[0].ShortName }); |
|
|
|
return Redirect($"/Documents/{listResult.Items[0].ShortName}"); |
|
|
|
} |
|
|
|
|
|
|
|
Projects = listResult.Items; |
|
|
|
@ -44,4 +44,4 @@ namespace Volo.Docs.Pages.Documents |
|
|
|
return Page(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|