mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-08 22:17:34 +01:00
Fix key package API returning display_name rather than username
This commit is contained in:
parent
e0a92c6455
commit
7ffecbb318
@ -510,7 +510,7 @@ def all_deps():
|
||||
}
|
||||
|
||||
page = get_int_or_abort(request.args.get("page"), 1)
|
||||
num = min(get_int_or_abort(request.args.get("n"), 100), 100)
|
||||
num = min(get_int_or_abort(request.args.get("n"), 100), 300)
|
||||
pagination: flask_sqlalchemy.Pagination = query.paginate(page, num, True)
|
||||
return jsonify({
|
||||
"page": pagination.page,
|
||||
|
@ -95,7 +95,7 @@ Tokens can be attained by visiting [Settings > API Tokens](/user/tokens/).
|
||||
* GET `/api/dependencies/`
|
||||
* Returns `provides` and raw dependencies for all packages.
|
||||
* Supports [Package Queries](#package-queries)
|
||||
* [Paginated result](#paginated-results), max 100 results per page
|
||||
* [Paginated result](#paginated-results), max 300 results per page
|
||||
* Each item in `items` will be a dictionary with the following keys:
|
||||
* `type`: One of `GAME`, `MOD`, `TXP`.
|
||||
* `author`: Username of the package author.
|
||||
|
@ -453,7 +453,7 @@ class Package(db.Model):
|
||||
def getAsDictionaryKey(self):
|
||||
return {
|
||||
"name": self.name,
|
||||
"author": self.author.display_name,
|
||||
"author": self.author.username,
|
||||
"type": self.type.toName(),
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user