Skip to content

Commit

Permalink
chcekuser
Browse files Browse the repository at this point in the history
  • Loading branch information
brucedonovan committed Sep 18, 2023
1 parent 1ff1085 commit 2e26fcd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion integrations/center.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,10 +701,12 @@ def _fetch_nft_asset_price_str(network: str, address: str, token_id: str) -> Opt
@auth.authenticate_user_id()
def fetch_center_image(response, network: str, address: str, token_id: str, size: str, user_id:str=None):

# TODO check if user is authenticated
url = f"{API_URL}/v2/{network}/{address}/nft/{token_id}/render/{size}"
resp = requests.get(url, headers=HEADERS)

# Check if user is authenticated
if not user_id: return None

# return response.content
if resp.status_code != 200:
# Handle error appropriately, return a message, or another status code
Expand Down

0 comments on commit 2e26fcd

Please sign in to comment.