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