mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 01:51:40 -05:00
get rid of setPostedAt method (not used + security risk)
This commit is contained in:
parent
f75300529f
commit
f14df077b4
1 changed files with 0 additions and 15 deletions
|
@ -231,21 +231,6 @@ Meteor.methods({
|
|||
|
||||
},
|
||||
|
||||
setPostedAt: function(post, customPostedAt){
|
||||
|
||||
// this method is not actually used?
|
||||
|
||||
check(post, Posts.simpleSchema());
|
||||
check(customPostedAt, Date);
|
||||
|
||||
var postedAt = new Date(); // default to current date and time
|
||||
|
||||
if(Users.is.admin(Meteor.user()) && typeof customPostedAt !== 'undefined') // if user is admin and a custom datetime has been set
|
||||
postedAt = customPostedAt;
|
||||
|
||||
Posts.update(post._id, {$set: {postedAt: postedAt}});
|
||||
},
|
||||
|
||||
approvePost: function(postId){
|
||||
|
||||
check(postId, String);
|
||||
|
|
Loading…
Add table
Reference in a new issue