Skip to content

Commit

Permalink
Step 9.3: Move Parties to collection.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and Dotan Simha committed Nov 22, 2016
1 parent ef0412a commit a3a65ff
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions imports/api/parties/collection.js
@@ -0,0 +1,15 @@
import { Mongo } from 'meteor/mongo';

export const Parties = new Mongo.Collection('parties');

Parties.allow({
insert(userId, party) {
return userId && party.owner === userId;
},
update(userId, party, fields, modifier) {
return userId && party.owner === userId;
},
remove(userId, party) {
return userId && party.owner === userId;
}
});

0 comments on commit a3a65ff

Please sign in to comment.