mirror of
https://github.com/oskvr37/tiddl.git
synced 2026-06-13 04:05:08 +03:00
🐛 refreshing token should now work with context (#91)
This commit is contained in:
@@ -62,7 +62,13 @@ def cli(ctx: Context, verbose: bool, quiet: bool, no_cache: bool):
|
||||
|
||||
logging.getLogger("urllib3").setLevel(logging.ERROR)
|
||||
|
||||
refresh(ctx)
|
||||
# BUG: tiddl raises AuthError after token refresh,
|
||||
# probably ctx is not working like this.
|
||||
# NOTE: got 'fixed',
|
||||
# but i will know if it works after my token expire
|
||||
|
||||
if ctx.invoked_subcommand in ("fav", "file", "search", "url"):
|
||||
ctx.invoke(refresh)
|
||||
|
||||
|
||||
cli.add_command(ConfigCommand)
|
||||
|
||||
@@ -23,6 +23,8 @@ def AuthGroup():
|
||||
"""Manage Tidal token."""
|
||||
|
||||
|
||||
@AuthGroup.command("refresh")
|
||||
@passContext
|
||||
def refresh(ctx: Context):
|
||||
"""Refresh auth token when is expired"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user