Skip to content

Commit

Permalink
(#433) users: update infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintAngeLs committed Oct 11, 2024
1 parent 8539250 commit 86f24b8
Showing 1 changed file with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,19 @@ public static UserNotificationsDocument AsDocument(this UserNotifications entity
public static NotificationPreferencesDto AsDto(this NotificationPreferences notificationPreferences)
=> new NotificationPreferencesDto
{
AccountChanges = notificationPreferences.AccountChanges,
SystemLogin = notificationPreferences.SystemLogin,
NewEvent = notificationPreferences.NewEvent,
InterestBasedEvents = notificationPreferences.InterestBasedEvents,
EventNotifications = notificationPreferences.EventNotifications,
CommentsNotifications = notificationPreferences.CommentsNotifications,
PostsNotifications = notificationPreferences.PostsNotifications,
FriendsNotifications = notificationPreferences.FriendsNotifications
EventRecommendation = notificationPreferences.EventRecommendation,
FriendsRecommendation = notificationPreferences.FriendsRecommendation,
FriendsPosts = notificationPreferences.FriendsPosts,
PostsRecommendation = notificationPreferences.PostsRecommendation,
EventsIAmInterestedInNotification = notificationPreferences.EventsIAmInterestedInNotification,
EventsIAmSignedUpToNotification = notificationPreferences.EventsIAmSignedUpToNotification,
PostsOfPeopleIFollowNotification = notificationPreferences.PostsOfPeopleIFollowNotification,
EventNotificationForPeopleIFollow = notificationPreferences.EventNotificationForPeopleIFollow
};

public static UserNotificationsDocument AsDocument(this NotificationPreferencesDto dto)
Expand All @@ -164,14 +169,19 @@ public static UserNotificationsDocument AsDocument(this NotificationPreferencesD
Id = Guid.NewGuid(),
UserId = dto.StudentId,
NotificationPreferences = new NotificationPreferences(
dto.AccountChanges,
dto.SystemLogin,
dto.NewEvent,
dto.InterestBasedEvents,
dto.EventNotifications,
dto.CommentsNotifications,
dto.PostsNotifications,
dto.FriendsNotifications
dto.EventRecommendation,
dto.FriendsRecommendation,
dto.FriendsPosts,
dto.PostsRecommendation,
dto.EventsIAmInterestedInNotification,
dto.EventsIAmSignedUpToNotification,
dto.PostsOfPeopleIFollowNotification,
dto.EventNotificationForPeopleIFollow
)
};

Expand Down

0 comments on commit 86f24b8

Please sign in to comment.