Last active
January 24, 2016 12:54
-
-
Save varavut/8d62cff6be7662a4aced to your computer and use it in GitHub Desktop.
This file contains hidden or 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({ | |
'Threads.delete': function (threadId) { | |
if (!this.userId) | |
throw new Meteor.Error('Unauthorized', 'Please login before perform an action'); | |
check(threadId, String); | |
Threads.remove({ | |
_id: threadId, | |
owner: this.userId, | |
}); | |
return { message: 'Threads.delete OK' }; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment