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)
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)
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')
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)
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')