Exemple #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)
Exemple #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)
Exemple #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
def status():
  return Service().status()
def callback():
  return Service().callback()
def login():
  return Service().login()
Exemple #7
0
def production(path):
    return Service().get_contents(path, 'production')
Exemple #8
0
def draft(path):
    return Service().get_contents(path, 'draft')
Exemple #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)
Exemple #10
0
def clear_delete_marker(path):
    return Service().clear_delete_marker(path)
Exemple #11
0
def get_signed_put_url(path):
    return Service().get_presign_url('PUT', path)
Exemple #12
0
def get_signed_post_url():
    return Service().get_presign_url('POST')
Exemple #13
0
def files():
    if request.method == 'GET':
        return Service().get_all()
    else:
        return Service().post()
def show_status():
  return Service().show_status()
Exemple #15
0
def publish():
    return Service().publish()
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)