mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 14:34:23 +01:00
Do not crash if /apps/{appId} do not exists
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user