2014-06-19 23:36:51 +08:00
|
|
|
# Publish only the users that are in the particular meetingId
|
|
|
|
# On the client side we pass the meetingId parameter
|
2014-06-19 23:19:32 +08:00
|
|
|
Meteor.publish 'users', (meetingId) ->
|
2014-06-25 02:20:18 +08:00
|
|
|
Meteor.Users.find({meetingId: meetingId})
|
2014-06-27 23:37:33 +08:00
|
|
|
|
|
|
|
Meteor.publish 'chat', (meetingId) ->
|
|
|
|
Meteor.Chat.find({meetingId: meetingId})
|
2014-07-08 04:31:18 +08:00
|
|
|
|
|
|
|
Meteor.publish 'shapes', (meetingId) ->
|
|
|
|
Meteor.Shapes.find({meetingId: meetingId})
|
2014-07-08 04:58:50 +08:00
|
|
|
|
|
|
|
Meteor.publish 'slides', (meetingId) ->
|
|
|
|
Meteor.Slides.find({meetingId: meetingId})
|
|
|
|
|
2014-07-10 00:06:25 +08:00
|
|
|
Meteor.publish 'meetings', (meetingId) ->
|
|
|
|
Meteor.Meetings.find({meetingId: meetingId})
|
2014-07-28 23:00:07 +08:00
|
|
|
|
|
|
|
# Clear all data in subcriptions
|
|
|
|
@clearCollections = ->
|
|
|
|
Meteor.Users.remove({})
|
|
|
|
console.log "cleared Users Collection!"
|
|
|
|
Meteor.Chat.remove({})
|
|
|
|
console.log "cleared Chat Collection!"
|
|
|
|
Meteor.Meetings.remove({})
|
|
|
|
console.log "cleared Meetings Collection!"
|
|
|
|
Meteor.Shapes.remove({})
|
|
|
|
console.log "cleared Shapes Collection!"
|
|
|
|
Meteor.Slides.remove({})
|
|
|
|
console.log "cleared Slides Collection!"
|