trainingpeaks to production
This commit is contained in:
@@ -40,7 +40,7 @@ from rowsandall_app.settings import (
|
||||
TP_REDIRECT_URI,TP_CLIENT_KEY,
|
||||
)
|
||||
|
||||
tpapilocation = "https://api.sandbox.trainingpeaks.com"
|
||||
tpapilocation = "https://api.trainingpeaks.com"
|
||||
|
||||
# Custom error class - to raise a NoTokenError
|
||||
class TPNoTokenError(Exception):
|
||||
@@ -107,7 +107,7 @@ def do_refresh_token(refreshtoken):
|
||||
}
|
||||
|
||||
|
||||
url = "https://oauth.sandbox.trainingpeaks.com/oauth/token"
|
||||
url = "https://oauth.trainingpeaks.com/oauth/token"
|
||||
|
||||
response = requests.post(url,
|
||||
data=post_data,
|
||||
@@ -141,7 +141,7 @@ def get_token(code):
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
}
|
||||
|
||||
response = requests.post("https://oauth.sandbox.trainingpeaks.com/oauth/token",
|
||||
response = requests.post("https://oauth.trainingpeaks.com/oauth/token",
|
||||
data=post_data)
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ def make_authorization_url(request):
|
||||
"redirect_uri": TP_REDIRECT_URI,
|
||||
"scope": "file:write",
|
||||
}
|
||||
url = "https://oauth.sandbox.trainingpeaks.com/oauth/authorize?" +urllib.urlencode(params)
|
||||
url = "https://oauth.trainingpeaks.com/oauth/authorize?" +urllib.urlencode(params)
|
||||
|
||||
return HttpResponseRedirect(url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user