rename files -> file_list

This commit is contained in:
2014-10-23 22:28:45 +02:00
parent 0c1065ee24
commit b152e8a50f
2 changed files with 3 additions and 3 deletions

View File

@@ -68,7 +68,7 @@ class PathHandle:
import requests
payload = {"path": "/".join(path)}
r = requests.get(PathHandle.request_url("files"), params=payload, auth=("bam", "bam"))
r = requests.get(PathHandle.request_url("file_list"), params=payload, auth=("bam", "bam"))
print(r.text)
return r.json()

View File

@@ -109,10 +109,10 @@ class FileAPI(Resource):
super(FileAPI, self).__init__()
def get(self):
filepath = os.path.join(app.config['STORAGE_PATH'], request.args['filepath'])
filepath = os.path.join(app.config['STORAGE_PATH'], request.args['filepath'])
f = open(filepath, 'rb')
return Response(f, direct_passthrough=True)
api.add_resource(FilesListAPI, '/files', endpoint='files')
api.add_resource(FilesListAPI, '/file_list', endpoint='file_list')
api.add_resource(FileAPI, '/file', endpoint='file')