mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 18:11:36 +01:00
Do not crash if /apps/{appId} do not exists
This commit is contained in:
parent
9aa35f3488
commit
f4823d962a
@ -43,8 +43,10 @@ namespace BTCPayServer.Controllers
|
||||
[HttpGet("/apps/{appId}")]
|
||||
public async Task<IActionResult> RedirectToApp(string appId)
|
||||
{
|
||||
|
||||
switch ((await _AppService.GetApp(appId, null)).AppType)
|
||||
var app = await _AppService.GetApp(appId, null);
|
||||
if (app is null)
|
||||
return NotFound();
|
||||
switch (app.AppType)
|
||||
{
|
||||
case nameof(AppType.Crowdfund):
|
||||
return RedirectToAction("ViewCrowdfund", new { appId });
|
||||
|
Loading…
Reference in New Issue
Block a user