I guess current_app isn't a function

This commit is contained in:
Edward Betts 2019-10-09 20:43:28 +01:00
parent 9cd3d3c59b
commit e38e1b994d

View file

@ -3,7 +3,7 @@ from requests_oauthlib import OAuth1Session
from urllib.parse import urlencode
def api_post_request(params):
app = current_app()
app = current_app
url = 'https://www.wikidata.org/w/api.php'
client_key = app.config['CLIENT_KEY']
client_secret = app.config['CLIENT_SECRET']
@ -14,7 +14,7 @@ def api_post_request(params):
return oauth.post(url, data=params, timeout=4)
def api_request(params):
app = current_app()
app = current_app
url = 'https://www.wikidata.org/w/api.php?' + urlencode(params)
client_key = app.config['CLIENT_KEY']
client_secret = app.config['CLIENT_SECRET']