Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
nhathoang989 committed Oct 16, 2023
1 parent 0d46fbf commit ff68f95
Show file tree
Hide file tree
Showing 22 changed files with 16,293 additions and 5,100 deletions.
10 changes: 5 additions & 5 deletions src/applications/Mixcore/Controllers/AppController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ protected override void ValidateRequest()
}

#region Routes
[Route("{baseRoute}/{param1?}/{param2?}/{param3?}/{param4?}/{param5?}/{param6?}")]
public async Task<IActionResult> Index(string baseRoute)
[Route("{appName}/{param1?}/{param2?}/{param3?}/{param4?}/{param5?}/{param6?}")]
public async Task<IActionResult> Index(string appName)
{
if (IsValid)
{
return await App($"/app/{baseRoute}");
return await App($"/app/{appName}");
}
else
{
Expand All @@ -69,11 +69,11 @@ public async Task<IActionResult> Index(string baseRoute)
#endregion Routes

#region Helper
protected async Task<IActionResult> App(string baseRoute)
protected async Task<IActionResult> App(string baseHref)
{
// Home App
var pageRepo = ApplicationViewModel.GetRepository(Uow, _cacheService);
var page = await pageRepo.GetSingleAsync(m => m.BaseRoute == baseRoute && m.MixTenantId == CurrentTenant.Id);
var page = await pageRepo.GetSingleAsync(m => m.BaseHref == baseHref && m.MixTenantId == CurrentTenant.Id);
if (page == null)
return NotFound();

Expand Down
Loading

0 comments on commit ff68f95

Please sign in to comment.