Add proposal workflow and voting API
This commit is contained in:
1 parent
9ca23a2c15
commit
1ff4a0a814
17 files changed
+796
-83
No files matched your search
@@ -1,7 +1,7 @@
|
||||
using Helpdesk.Application.Abstractions;
|
||||
using Helpdesk.Application.Common;
|
||||
using Helpdesk.Domain;
|
||||
using Helpdesk.Domain.Issues;
|
||||
using Helpdesk.Domain.Notifications;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Helpdesk.Application.Notifications;
|
||||
@@ -46,13 +46,13 @@ public sealed class NotificationService(IAppDbContext db, ICurrentUser currentUs
|
||||
|
||||
public async Task MarkAllReadAsync(CancellationToken ct) => await MarkUnreadRowsAsync(Inbox(), ct);
|
||||
|
||||
private IQueryable<IssueNotification> Inbox()
|
||||
private IQueryable<Notification> Inbox()
|
||||
{
|
||||
var userId = currentUser.Id;
|
||||
return db.IssueNotifications.Where(n => n.UserId == userId);
|
||||
return db.Notifications.Where(n => n.UserId == userId);
|
||||
}
|
||||
|
||||
private Task<int> MarkUnreadRowsAsync(IQueryable<IssueNotification> query, CancellationToken ct)
|
||||
private Task<int> MarkUnreadRowsAsync(IQueryable<Notification> query, CancellationToken ct)
|
||||
{
|
||||
var now = clock.GetUtcNow().UtcDateTime;
|
||||
return query.Where(n => n.ReadAt == null)
|
||||
|
||||
Reference in new issue
Block a user