diff options
author | rubenwardy <rw@rubenwardy.com> | 2020-06-05 04:46:46 +0100 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2020-06-05 04:47:50 +0100 |
commit | 66885fedaadf6f19de726cf93f1b01364c80a0ea (patch) | |
tree | 733ca9d17003b6fd4d5bdde86206636349515017 | |
parent | 064eb9df0442fa012d3692208cd2579ab3c6caa3 (diff) | |
download | cheatdb-66885fedaadf6f19de726cf93f1b01364c80a0ea.tar.xz |
Fix bugs, and document
-rw-r--r-- | app/blueprints/api/endpoints.py | 4 | ||||
-rw-r--r-- | app/flatpages/help/api.md | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/blueprints/api/endpoints.py b/app/blueprints/api/endpoints.py index 051716b..8ac6e70 100644 --- a/app/blueprints/api/endpoints.py +++ b/app/blueprints/api/endpoints.py @@ -58,10 +58,10 @@ def package(package): def package_dependencies(package): ret = [] - include_optional = request.args.get("include_optional", True) + only_hard = request.args.get("only_hard", True) for dep in package.dependencies: - if not include_optional and dep.option: + if only_hard and dep.optional: continue name = None diff --git a/app/flatpages/help/api.md b/app/flatpages/help/api.md index b032b5d..ab5e71c 100644 --- a/app/flatpages/help/api.md +++ b/app/flatpages/help/api.md @@ -25,6 +25,8 @@ Tokens can be attained by visiting [Profile > "API Tokens"](/user/tokens/). * GET `/api/packages/` - See [Package Queries](#package-queries) * GET `/api/scores/` - See [Package Queries](#package-queries) * GET `/api/packages/<username>/<name>/` +* GET `/api/packages/<username>/<name>/` + * If query argument `only_hard` is present, only hard deps will be returned. ### Releases |