Skip to content

Commit 96d446f

Browse files
committed
Fix typos in API
And fix typos in CHANGELOG Reference: #854 Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
1 parent 0ff68fc commit 96d446f

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Version v30.0.0
6161

6262
- Add authentication for REST API endpoint.
6363
The autentication is disabled by default and can be enabled using the
64-
SCANCODEIO_REQUIRE_AUTHENTICATION settings.
64+
VULNERABLECODEIO_REQUIRE_AUTHENTICATION settings.
6565
When enabled, users have to authenticate using
6666
their API Key in the REST API.
6767
Users can be created using the Django "createsuperuser" management command.

vulnerabilities/api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,11 @@ def bulk_search(self, request):
308308
"""
309309
This endpoint is used to search for vulnerabilities by more than one CPE.
310310
"""
311-
response = []
312311
cpes = request.data.get("cpes", []) or []
313312
if not cpes or not isinstance(cpes, list):
314313
return Response(
315314
status=400,
316-
data={"Error": "A non-empty 'cpe' list of package URLs is required."},
315+
data={"Error": "A non-empty 'cpes' list of CPEs is required."},
317316
)
318317
for cpe in cpes:
319318
if not cpe.startswith("cpe"):

vulnerabilities/tests/test_fix_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def test_with_empty_list(self):
378378
data=json.dumps(request_body),
379379
content_type="application/json",
380380
).json()
381-
assert response == {"Error": "A non-empty 'cpe' list of package URLs is required."}
381+
assert response == {"Error": "A non-empty 'cpes' list of CPEs is required."}
382382

383383
def test_with_invalid_cpes(self):
384384
request_body = {"cpes": ["CVE-2022-2022"]}

0 commit comments

Comments
 (0)