1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-21 12:05:42 +01:00

Fix swap notification commands to use UtcNow (#4919)

This commit is contained in:
Thomas Avery 2024-10-21 12:10:03 -05:00 committed by GitHub
parent f82c0e3742
commit 2c4dd3ea12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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,