Skip to content

Instantly share code, notes, and snippets.

zimt28

Block or report user

Report or block zimt28

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zimt28
zimt28 / entries.js
Created Apr 30, 2014
Meteor app - Allow rules
View entries.js
Meteor.Collection.prototype.addTimestamps = function () {
this.deny({
insert: function(userId, doc) {
doc.createdAt = Date.now();
doc.updatedAt = Date.now();
return false;
},
update: function(userId, doc, fieldNames, modifier) {
modifier.$set.updatedAt = Date.now();
You can’t perform that action at this time.