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

@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using BTCPayServer.Data;
using BTCPayServer.Models.AppViewModels;
using BTCPayServer.Services.Apps;
using BTCPayServer.Services.Mails;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@@ -90,8 +91,10 @@ namespace BTCPayServer.Controllers
if (app == null)
return NotFound();
var settings = app.GetSettings<PointOfSaleSettings>();
var vm = new UpdatePointOfSaleViewModel()
{
NotificationEmailWarning = await ShowEmailWarningForStore(app.StoreDataId),
Id = appId,
Title = settings.Title,
EnableShoppingCart = settings.EnableShoppingCart,