Skip to content

Commit

Permalink
Obtain API key from secrets function
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRyanSmith committed Jul 26, 2023
1 parent fa90f27 commit 950e2cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/origin_trials_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


from framework import basehandlers
from framework.secrets import get_ot_api_key
import requests
import settings

Expand All @@ -23,7 +24,7 @@ class OriginTrialsAPI(basehandlers.APIHandler):

def do_get(self, **kwargs):
"""Get a list of all origin trials."""
key = settings.OT_API_KEY
key = get_ot_api_key()
# Return an empty list if no API key is found.
if key == None:
return []
Expand Down

0 comments on commit 950e2cf

Please sign in to comment.