fix: [api] default start/end for publisher and project fixed

main
Alexandre Dulaunoy 2021-05-25 10:32:15 +02:00
parent 3bb400c585
commit b9fc0114c7
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 4 additions and 4 deletions

View File

@ -49,9 +49,9 @@ class favicon(Resource):
def get(self):
return send_from_directory(os.path.join(app.root_path, 'static'),'favicon.ico',mimetype='image/vnd.microsoft.icon')
@api.route('/list/publisher/<int:start>/<int:end>', defaults={"start": 0, "end": 10})
@api.route('/list/publisher/<int:start>/<int:end>')
class list_publisher(Resource):
def get(self, start=0, end=10):
def get(self, start, end):
uuids = r.zrange('t:1', start, end)
publishers = []
for uuidvalue in uuids:
@ -59,9 +59,9 @@ class list_publisher(Resource):
publishers.append(_publisher)
return publishers
@api.route('/list/project/<int:start>/<int:end>', defaults={"start": 0, "end": 10})
@api.route('/list/project/<int:start>/<int:end>')
class list_project(Resource):
def get(self, start=0, end=10):
def get(self, start, end):
uuids = r.zrange('t:2', start, end)
publishers = []
for uuidvalue in uuids: