Skip to content

Commit

Permalink
Use settings for the website URL
Browse files Browse the repository at this point in the history
  • Loading branch information
nikdoof committed Feb 7, 2024
1 parent a87b396 commit dd68110
Show file tree
Hide file tree
Showing 2 changed files with 354 additions and 363 deletions.
4 changes: 3 additions & 1 deletion hackspaceapi/services/website.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import logging
from typing import Iterable, Optional
from urllib.parse import urljoin

import requests
from cachetools.func import ttl_cache
from prometheus_client import Summary

from hackspaceapi.models.config import settings
from hackspaceapi.services.session import get_requests_session

session = get_requests_session()
Expand All @@ -21,7 +23,7 @@ def get_membership_data() -> Optional[Iterable]:
Pull the JSON formatted membership plan data from the Leigh Hackspace
website.
"""
url = "https://web-test.leighhack.org/membership/index.json"
url = urljoin(settings.hackspace_website_url, "/membership/index.json")
try:
resp = session.get(url)
if resp.ok:
Expand Down
Loading

0 comments on commit dd68110

Please sign in to comment.