mirror of
https://github.com/bitwarden/server
synced 2025-12-17 08:43:27 +00:00
Fix swap notification commands to use UtcNow (#4919)
This commit is contained in:
@@ -49,11 +49,11 @@ public class MarkNotificationDeletedCommand : IMarkNotificationDeletedCommand
|
|||||||
|
|
||||||
if (notificationStatus == null)
|
if (notificationStatus == null)
|
||||||
{
|
{
|
||||||
notificationStatus = new NotificationStatus()
|
notificationStatus = new NotificationStatus
|
||||||
{
|
{
|
||||||
NotificationId = notificationId,
|
NotificationId = notificationId,
|
||||||
UserId = _currentContext.UserId.Value,
|
UserId = _currentContext.UserId.Value,
|
||||||
DeletedDate = DateTime.Now
|
DeletedDate = DateTime.UtcNow
|
||||||
};
|
};
|
||||||
|
|
||||||
await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.User, notificationStatus,
|
await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.User, notificationStatus,
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ public class MarkNotificationReadCommand : IMarkNotificationReadCommand
|
|||||||
|
|
||||||
if (notificationStatus == null)
|
if (notificationStatus == null)
|
||||||
{
|
{
|
||||||
notificationStatus = new NotificationStatus()
|
notificationStatus = new NotificationStatus
|
||||||
{
|
{
|
||||||
NotificationId = notificationId,
|
NotificationId = notificationId,
|
||||||
UserId = _currentContext.UserId.Value,
|
UserId = _currentContext.UserId.Value,
|
||||||
ReadDate = DateTime.Now
|
ReadDate = DateTime.UtcNow
|
||||||
};
|
};
|
||||||
|
|
||||||
await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.User, notificationStatus,
|
await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.User, notificationStatus,
|
||||||
|
|||||||
Reference in New Issue
Block a user