Esempio n. 1
0
def get_match(item_id):
    item = get_or_404(storage.get_doc, Match.STORAGE_NAME, item_id)
    return jsonify(item)
Esempio n. 2
0
def get_log(item_id):
    item = get_or_404(storage.get_doc, Match.STORAGE_NAME, item_id)
    return jsonify(log=item['log'])
Esempio n. 3
0
def get_deck(item_id):
    item = get_or_404(storage.get_doc, Deck.STORAGE_NAME, item_id)
    return jsonify(item)
Esempio n. 4
0
def get_player(item_id):
    item = get_or_404(storage.get_doc, Player.STORAGE_NAME, item_id)
    return jsonify(item)
Esempio n. 5
0
def get_card(item_id):
    item = get_or_404(storage.get_doc, Card.STORAGE_NAME, item_id)
    return jsonify(item)
Esempio n. 6
0
def all_matches():
    items = get_or_404(storage.all_docs, Match.STORAGE_NAME)
    return jsonify(items)
Esempio n. 7
0
def all_players():
    items = get_or_404(storage.all_docs, Player.STORAGE_NAME)
    return jsonify(items)
Esempio n. 8
0
def all_decks():
    items = get_or_404(storage.all_docs, Deck.STORAGE_NAME)
    return jsonify(items)
Esempio n. 9
0
def all_cards():
    items = get_or_404(storage.all_docs, Card.STORAGE_NAME)
    return jsonify(items)