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