Ejemplo n.º 1
0
def manage_file(path):
    if request.method == 'DELETE':
        return Service().delete(path)
    elif request.method == 'GET':
        return path
    else:
        return Service().put(path)
Ejemplo n.º 2
0
def file(path):
    print(path, flush=True)
    v = 'production'
    if g.token_data['version'] != 'production':
        v = 'draft'

    return Service().get_contents(path, v)
Ejemplo n.º 3
0
def get_files():
    files = Service().get_all()
    for f in files:
        if g.token_data['version'] == 'production':
            f.update(f['production'])
        else:
            f.update(f['draft'])

        f.pop('draft')
        f.pop('production')

    return files
Ejemplo n.º 4
0
def status():
  return Service().status()
Ejemplo n.º 5
0
def callback():
  return Service().callback()
Ejemplo n.º 6
0
def login():
  return Service().login()
Ejemplo n.º 7
0
def production(path):
    return Service().get_contents(path, 'production')
Ejemplo n.º 8
0
def draft(path):
    return Service().get_contents(path, 'draft')
Ejemplo n.º 9
0
def init():
    if os.environ.get('DEV_MODE', 'False').lower() == 'true':
        import dev_mock
        from behavior import Service
        dm = dev_mock.ServiceDevMock(Service().do_properties)
Ejemplo n.º 10
0
def clear_delete_marker(path):
    return Service().clear_delete_marker(path)
Ejemplo n.º 11
0
def get_signed_put_url(path):
    return Service().get_presign_url('PUT', path)
Ejemplo n.º 12
0
def get_signed_post_url():
    return Service().get_presign_url('POST')
Ejemplo n.º 13
0
def files():
    if request.method == 'GET':
        return Service().get_all()
    else:
        return Service().post()
Ejemplo n.º 14
0
def show_status():
  return Service().show_status()
Ejemplo n.º 15
0
def publish():
    return Service().publish()
Ejemplo n.º 16
0
def properties():
  return Service().properties()
def data(route_path):
    if request.method == 'POST':
        return Service().post_data(route_path)
    else:
        return Service().get_data(route_path)