Example #1
0
 def get(self, *args, **kwargs):
     mongo_link_ids = self.get_args_as_mongo_object_ids('links')
     query = {'_id': {'$in': mongo_link_ids}}
     boards = yield Board.get_by_query(self.db, query)
     self.write_json(boards)
Example #2
0
 def get(self, *args, **kwargs):
     board_id = self.get_id_as_mongo_object()
     board = yield Board.get_by_id(self.db, board_id)
     self._push_activity('load', board)
     self.write_json(board)
Example #3
0
 def delete(self, *args, **kwargs):
     board_id = self.get_id_as_mongo_object()
     board = yield Board.remove(self.db, board_id)
     self._push_activity('remove', board)
     self.write('ok')
Example #4
0
 def get(self, *args, **kwargs):
     user_id = self.get_argument('user_id')
     boards = yield Board.get_by_user_id(self.db, user_id)
     self.write_json(boards)
Example #5
0
 def delete(self, *args, **kwargs):
     user_id = self.get_argument('user_id')
     boards = yield Board.remove_by_user_id(self.db, user_id)
     for board in boards:
         push_user_activity('bulk board remove', user_id, 'board', board)
     self.write('ok')
Example #6
0
 def get(self, *args, **kwargs):
     mongo_link_ids = self.get_args_as_mongo_object_ids('links')
     query = {'_id': {'$in': mongo_link_ids}}
     boards = yield Board.get_by_query(self.db, query)
     self.write_json(boards)
Example #7
0
 def delete(self, *args, **kwargs):
     board_id = self.get_id_as_mongo_object()
     board = yield Board.remove(self.db, board_id)
     self._push_activity('remove', board)
     self.write('ok')
Example #8
0
 def get(self, *args, **kwargs):
     board_id = self.get_id_as_mongo_object()
     board = yield Board.get_by_id(self.db, board_id)
     self._push_activity('load', board)
     self.write_json(board)
Example #9
0
 def delete(self, *args, **kwargs):
     user_id = self.get_argument('user_id')
     boards = yield Board.remove_by_user_id(self.db, user_id)
     for board in boards:
         push_user_activity('bulk board remove', user_id, 'board', board)
     self.write('ok')
Example #10
0
 def get(self, *args, **kwargs):
     user_id = self.get_argument('user_id')
     boards = yield Board.get_by_user_id(self.db, user_id)
     self.write_json(boards)