def cards_index(story_id): story = get_story(story_id) cur = cards.find({"stories": story["_id"]}) cur = cur.sort("offset", ASCENDING) cards_ = [] for card in cur: card["evidences"] = get_evidences(card) cards_.append(card) return jsonify(cards_)
def cards_index(story_id): story = get_story(story_id) cur = cards.find({'stories': story['_id']}) cur = cur.sort('offset', ASCENDING) cards_ = [] for card in cur: card['evidences'] = get_evidences(card) cards_.append(card) return jsonify(cards_)
def cards_get(story_id, card_id): story = get_story(story_id) card = get_card(story, card_id) card["evidences"] = get_evidences(card) return jsonify(card)
def cards_get(story_id, card_id): story = get_story(story_id) card = get_card(story, card_id) card['evidences'] = get_evidences(card) return jsonify(card)