示例#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)
示例#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)
示例#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')
示例#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)
示例#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')
示例#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)
示例#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')
示例#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)
示例#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')
示例#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)