Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Commit

Permalink
adding auth req for /interactions api endpoint (#41)
Browse files Browse the repository at this point in the history
* adding auth req for /interactions api endpoint

* test fix
  • Loading branch information
Anton Sapozhnikov authored May 15, 2020
1 parent 98c2bd0 commit 33c3ab9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions comet_core/api_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,7 @@ def get_issues():


@bp.route("/interactions", methods=["GET"])
@requires_auth
def get_interactions_get():
"""This endpoint expose the get_interactions functionality via GET request.
Doesn't required authentication as the information returned is deemed not sensitive.
Expand All @@ -507,6 +508,7 @@ def get_interactions_get():


@bp.route("/interactions", methods=["POST"])
@requires_auth
def get_interactions_post():
"""This endpoint expose the get_interactions functionality via POST request.
Doesn't required authentication as the information returned is deemed not sensitive.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

setuptools.setup(
name="comet-core",
version="2.6.0",
version="2.6.1",
url="https://github.com/spotify/comet-core",
author="Spotify Platform Security",
author_email="wasabi@spotify.com",
Expand Down
1 change: 1 addition & 0 deletions tests/test_api_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,6 @@ def test_endpoint_post_no_request_hydrator(client_without_request_hydrator):


def test_endpoint_get_interactions(client):
g.test_authorized_for = ["non@existant.com"]
res = client.post("/v0/interactions", json=post_json_data)
assert "[]" in res.data.decode("utf-8")

0 comments on commit 33c3ab9

Please sign in to comment.