Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 3076b31

Browse files
persist notification status on user model
1 parent 2f7aeaa commit 3076b31

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

server/models/users.model.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ module.exports = function (app) {
4545
wasSeeded: { type: Boolean },
4646
wasInvited: { type: Boolean },
4747
language: { type: String, default: 'en' },
48-
agbAccepted: { type: Date }
48+
termsAndConditionsAccepted: { type: Date },
49+
systemNotificationsSeen: { type: Array, default: [] }
4950
});
5051

5152
users.index({

server/services/users/users.hooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const cleanupBasicData = when(isProvider('external'),
1818
discard('password', '_computed', 'verifyExpires', 'resetExpires', 'verifyChanges')
1919
);
2020
const cleanupPersonalData = when(isProvider('external'),
21-
discard('email', 'verifyToken', 'verifyShortToken', 'doiToken')
21+
discard('email', 'verifyToken', 'verifyShortToken', 'doiToken', 'systemNnotificationsSeen')
2222
);
2323

2424
const restrict = [
@@ -163,7 +163,7 @@ module.exports = {
163163
thumbnails(thumbnailOptions),
164164
// remove personal data if its not the current authenticated user
165165
iff(isOwnEntry(false),
166-
cleanupPersonalData,
166+
cleanupPersonalData
167167
),
168168
iff(isOwnEntry(),
169169
populate({ schema: userSettingsPrivateSchema })

0 commit comments

Comments
 (0)