Spaces:
Running
Running
OnlyBiggg
commited on
Commit
·
d8fb01c
1
Parent(s):
87a0ffb
- core/token_manager.py +2 -2
core/token_manager.py
CHANGED
|
@@ -7,7 +7,7 @@ _token_cache = {
|
|
| 7 |
"access_token": None,
|
| 8 |
"expires_at": 0,
|
| 9 |
}
|
| 10 |
-
|
| 11 |
|
| 12 |
async def get_access_token() -> str:
|
| 13 |
current_time = int(time.time())
|
|
@@ -17,7 +17,7 @@ async def get_access_token() -> str:
|
|
| 17 |
|
| 18 |
async def refresh_access_token():
|
| 19 |
async with httpx.AsyncClient() as client:
|
| 20 |
-
response = await client.get(url=
|
| 21 |
response.raise_for_status()
|
| 22 |
data = response.json()
|
| 23 |
access_token = data.get("data")
|
|
|
|
| 7 |
"access_token": None,
|
| 8 |
"expires_at": 0,
|
| 9 |
}
|
| 10 |
+
API_BASE_URL_ACCESS_TOKEN = settings.API_BASE_URL_ACCESS_TOKEN
|
| 11 |
|
| 12 |
async def get_access_token() -> str:
|
| 13 |
current_time = int(time.time())
|
|
|
|
| 17 |
|
| 18 |
async def refresh_access_token():
|
| 19 |
async with httpx.AsyncClient() as client:
|
| 20 |
+
response = await client.get(url=API_BASE_URL_ACCESS_TOKEN)
|
| 21 |
response.raise_for_status()
|
| 22 |
data = response.json()
|
| 23 |
access_token = data.get("data")
|