Use attribute to map notifcations to their string

This commit is contained in:
nicolas.dorier
2020-06-15 17:05:12 +09:00
parent 9070b475ea
commit 7cdfa7d4c5
8 changed files with 49 additions and 15 deletions

View File

@@ -47,7 +47,7 @@ namespace BTCPayServer.Controllers
.OrderByDescending(a => a.Created)
.Skip(skip).Take(count)
.Where(a => a.ApplicationUserId == userId)
.Select(a => a.ViewModel())
.Select(a => a.ToViewModel())
.ToList(),
Total = _db.Notifications.Where(a => a.ApplicationUserId == userId).Count()
};