Show email warning on apps when settings are not complete (#794)

* Show email warning on apps when settings are not complete

closes #693

* refactor email warning logic
This commit is contained in:
Andrew Camilleri
2019-04-28 08:27:10 +02:00
committed by Nicolas Dorier
parent 6df83ad148
commit fcb1de8a86
8 changed files with 37 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ using System.Text.Encodings.Web;
using System.Threading.Tasks;
using BTCPayServer.Models.AppViewModels;
using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Mails;
using Microsoft.AspNetCore.Mvc;
namespace BTCPayServer.Controllers
@@ -33,6 +34,7 @@ namespace BTCPayServer.Controllers
var settings = app.GetSettings<CrowdfundSettings>();
var vm = new UpdateCrowdfundViewModel()
{
NotificationEmailWarning = await ShowEmailWarningForStore(app.StoreDataId),
Title = settings.Title,
Enabled = settings.Enabled,
EnforceTargetAmount = settings.EnforceTargetAmount,