mirror of
https://gitea.phreedom.club/localhost_frssoft/funkwlmpv
synced 2025-05-08 12:58:40 +00:00
Fix login in to new instance
This commit is contained in:
parent
9ec77975e5
commit
dc40e5331c
2 changed files with 7 additions and 6 deletions
|
@ -39,14 +39,14 @@ class current_instance:
|
|||
def select_instance(new_instance=None):
|
||||
current_instance.instance = new_instance
|
||||
with open(auth_file, 'rt') as f:
|
||||
auth = json.loads(f.read())
|
||||
auth = json.load(f)
|
||||
new_token = auth.get(current_instance.instance)
|
||||
current_instance.s.headers.update({"Authorization": None})
|
||||
current_instance.token = new_token
|
||||
current_instance.listen_token = None
|
||||
if new_token:
|
||||
s.get(f'https://{current_instance.instance}')
|
||||
s.headers.update({"Authorization": "Bearer " + new_token})
|
||||
current_instance.s.get(f'https://{current_instance.instance}')
|
||||
current_instance.s.headers.update({"Authorization": "Bearer " + new_token})
|
||||
|
||||
|
||||
if current_instance.token:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue