2015-07-23 11:31:08 +08:00
|
|
|
# --------------------------------------------------------------------------------------------
|
|
|
|
# Private methods on server
|
|
|
|
# --------------------------------------------------------------------------------------------
|
2015-07-25 07:09:27 +08:00
|
|
|
@addPollToCollection = (poll, requester_id, users) ->
|
|
|
|
entry =
|
|
|
|
poll_info:
|
|
|
|
"poll": poll
|
|
|
|
"requester": requester_id
|
|
|
|
"users": users
|
|
|
|
Meteor.Polls.insert(entry)
|
2015-07-23 11:31:08 +08:00
|
|
|
|
|
|
|
@clearPollCollection = (meetingId) ->
|
|
|
|
if meetingId?
|
|
|
|
Meteor.Polls.remove({meetingId: meetingId}, Meteor.log.info "cleared Polls Collection (meetingId: #{meetingId}!")
|
|
|
|
else
|
|
|
|
Meteor.Polls.remove({}, Meteor.log.info "cleared Polls Collection (all Polls)!")
|