Add pagination to the repository list API to make it better for public
Fixes #1166
This commit is contained in:
parent
4905f55268
commit
534ec9cb2b
5 changed files with 69 additions and 98 deletions
|
@ -14,9 +14,7 @@ def catalog_search():
|
|||
url = url_for('v2.catalog_search')
|
||||
|
||||
username = get_authenticated_user().username if get_authenticated_user() else None
|
||||
query = model.repository.get_visible_repositories(username, include_public=(username is None),
|
||||
limit=50)
|
||||
|
||||
query = model.repository.get_visible_repositories(username, include_public=(username is None))
|
||||
link, query = add_pagination(query, url)
|
||||
|
||||
response = jsonify({
|
||||
|
|
Reference in a new issue