home-refacto #40

Merged
Danhia merged 10 commits from :home-refacto into campus_scoreboard 2022-03-29 20:35:04 +02:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 39e3859836 - Show all commits

View File

@ -54,7 +54,10 @@ def authorize_intra42(request):
response = oauth_intra42.intra42.get('v2/me', token=token)
response = response.json()
intra42_id = response['id']
intra42_campus = response['campus'][0]['name']
print(intra42_campus)
request.user.userprofileinfo.intra42_id = intra42_id
request.user.userprofileinfo.intra42_campus = intra42_campus
request.user.userprofileinfo.save()
return redirect('accounts:edit')