Added Patreon notification badge for new patreon posts

This commit is contained in:
Stefan Zermatten
2019-02-21 11:51:46 +02:00
parent 2253672f43
commit 3fbb006783
8 changed files with 80 additions and 17 deletions

View File

@@ -70,6 +70,10 @@ Schemas.User = new SimpleSchema({
index: 1,
optional: true,
},
lastPatreonPostClicked: {
type: String,
optional: true,
},
});
Meteor.users.attachSchema(Schemas.User);
@@ -107,3 +111,11 @@ if (Meteor.isServer) Meteor.methods({
Meteor.users.update(this.userId, {$set: {apiKey}});
},
});
Meteor.methods({
clickPatreonPost(link) {
Meteor.users.update(this.userId, {$set: {
lastPatreonPostClicked: link
}});
},
});