Created
May 12, 2012 19:55
-
-
Save jonathanKingston/2668583 to your computer and use it in GitHub Desktop.
Filters psudo code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meteor.methods({ | |
'sabotage' | |
}); | |
Meteor.filters({ | |
'checkIsABeastieBoy' | |
}); | |
function checkIsABeastieBoy(args) { | |
if(args.user == 'Yauch') { | |
return true; | |
} | |
//Users here can also play with args here if they like too: args.user = 'so so so..' | |
//even returning anything but true causes the meteor method not to be called. | |
} | |
function sabotage() { | |
//destroy the musical planet | |
} | |
//CLIENT | |
Meteor.call('sabotage', {user: 'Yauch'}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment