Skip to content

Commit

Permalink
feat: switch to a super-client
Browse files Browse the repository at this point in the history
  • Loading branch information
rahularya50 committed Apr 21, 2020
1 parent 110edf3 commit 8d02250
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ def is_admin(course=None):
if not course:
course = get_course()
if g.get("is_admin") is None:
g.is_admin = requests.post("https://auth.apps.cs61a.org/admins/{}/is_admin".format(course), json={
g.is_admin = requests.post("https://auth.apps.cs61a.org/admins/is_admin", json={
"email": current_user.email,
"client_name": app.config["AUTH_KEY"],
"secret": app.config["AUTH_CLIENT_SECRET"],
"course": course,
}).json()
return g.is_admin

Expand Down Expand Up @@ -155,6 +156,7 @@ def read_csv(sheet_url, sheet_range):
values = requests.post("https://auth.apps.cs61a.org/google/read_spreadsheet", json={
"url": sheet_url,
"sheet_name": sheet_range,
"course": "cs61a",
"client_name": app.config["AUTH_KEY"],
"secret": app.config["AUTH_CLIENT_SECRET"],
}).json()
Expand Down

0 comments on commit 8d02250

Please sign in to comment.