added enabled to ViewCrowdfundViewModel, added warning on preview page

This commit is contained in:
Kevin Mulcrone
2019-03-03 17:06:11 -06:00
committed by Rockstar Developer
parent 0364a57cae
commit 0263a2950c
4 changed files with 10 additions and 4 deletions

View File

@@ -131,10 +131,8 @@ namespace BTCPayServer.Controllers
var isAdmin = await _AppService.GetAppDataIfOwner(GetUserId(), appId, AppType.Crowdfund) != null;
if (!settings.Enabled)
{
if (!isAdmin)
return NotFound("Crowdfund is not currently active");
if (!settings.Enabled && !isAdmin) {
return NotFound("Crowdfund is not currently active");
}
var info = (ViewCrowdfundViewModel)await _AppService.GetAppInfo(appId);