Skip to content

Commit

Permalink
Merge pull request #14 from Clubs-Council-IIITH/inter_communication
Browse files Browse the repository at this point in the history
Pass inter_communication_secret to signed-url call
  • Loading branch information
abhiramtilakiiit authored Nov 12, 2024
2 parents f3913db + 9879c67 commit 28dd13a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion queries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import os
from typing import List

import requests
Expand All @@ -10,6 +11,8 @@
# import all models and types
from otypes import CCRecruitmentType, Info, SignedURL

inter_communication_secret = os.getenv("INTER_COMMUNICATION_SECRET")


# fetch signed url from the files service
@strawberry.field
Expand All @@ -20,7 +23,11 @@ def signedUploadURL(info: Info) -> SignedURL:

# make request to files api
response = requests.get(
"http://files/signed-url", params={"user": json.dumps(user)}
"http://files/signed-url",
params={
"user": json.dumps(user),
"inter_communication_secret": inter_communication_secret,
},
)

# error handling
Expand Down

0 comments on commit 28dd13a

Please sign in to comment.