1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-06-29 21:51:08 +02:00

Don't hardcode OAuth2 parameters

This commit is contained in:
2021-11-14 15:17:55 +01:00
parent cdcb743b55
commit fe55a2a5ea
3 changed files with 24 additions and 15 deletions

View File

@ -178,7 +178,7 @@ class AccessToken(models.Model):
Extract information about the Note Kfet API by using the current
access token.
"""
data = requests.get('https://note-dev.crans.org/api/me/',
data = requests.get(f'{settings.NOTE_KFET_URL}/api/me/',
headers=self.auth_header()).json()
username = data['username']
email = data['email']