예제 #1
0
def holder_status_by_id(id=None):
    """Return /holder_statuses/<id> endpoint."""
    if (len(id) == 36):
        cursor.execute(
            'SELECT * FROM `holder_statuses` WHERE `id` = "{0}";'.format(id), )
        execution = cursor.fetchall()
        return util.jsondump(execution, cursor), 200, \
            {'Content-Type': 'application/json'}
    else:
        return jsonify(error=400)
예제 #2
0
def transaction_codes():
    """Return /transaction_codes endpoint."""
    cursor.execute('SELECT * FROM `transaction_codes`;')
    execution = cursor.fetchall()
    return util.jsondump(execution, cursor), 200, \
        {'Content-Type': 'application/json'}
예제 #3
0
def holder_types():
    """Return /holder_types endpoint."""
    cursor.execute('SELECT * FROM `holder_types`;')
    execution = cursor.fetchall()
    return util.jsondump(execution, cursor), 200, \
        {'Content-Type': 'application/json'}