Skip to content

Commit

Permalink
Changed refresh_token request
Browse files Browse the repository at this point in the history
  • Loading branch information
marzipankaiser committed Nov 11, 2021
1 parent f64c411 commit 759df6c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/drink.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ def get_login_token():
def refresh_token():
"""Fetch a new login token"""
global cfg, cache
r = requests.post(cfg['url'] + "/auth/login", data={'password': cfg['pw']},
headers={'Content-Type': 'application/json'})
r = requests.post(cfg['url'] + "/auth/login", json={'password': cfg['pw']})
if r.status_code == 403:
print("Failed to get login token: wrong password.", file=sys.stderr)
cfg.reset_parameter('pw')
Expand Down

0 comments on commit 759df6c

Please sign in to comment.