示例#1
0
文件: tables.py 项目: occrp/ouija
def rows(table_name):
    table = db.get(table_name)
    if table is None:
        raise NotFound()
    authz.require(authz.table(table))
    q = OuijaQuery(db, {
        'columns': [{'table': table_name}]
    })
    return jsonify(Pager(q, table_name=table_name, _external=True))
示例#2
0
文件: tables.py 项目: occrp/ouija
def view(table_name):
    table = db.get(table_name)
    if table is None:
        raise NotFound()
    authz.require(authz.table(table))
    return jsonify(table)