Fix link from app label (#2028)

This commit is contained in:
Andrew Camilleri
2020-11-02 12:26:11 +01:00
committed by GitHub
parent 793b1b56d9
commit d2910686cd
2 changed files with 6 additions and 5 deletions

View File

@@ -41,12 +41,13 @@ namespace BTCPayServer.Controllers
[HttpGet("/apps/{appId}")]
public async Task<IActionResult> RedirectToApp(string appId)
{
switch (await _AppService.GetAppInfo(appId))
switch ((await _AppService.GetApp(appId, null)).AppType)
{
case ViewCrowdfundViewModel _:
case nameof(AppType.Crowdfund):
return RedirectToAction("ViewCrowdfund", new {appId});
case ViewPointOfSaleViewModel _:
case nameof(AppType.PointOfSale):
return RedirectToAction("ViewPointOfSale", new {appId});
}