mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-08 23:32:40 +02:00
refactor(backend): Extract Airtable token refresh to shared utility
- Create app/utils/airtable_token_utils.py for token refresh logic - Update all connectors to use centralized token refresh function - Affected connectors: airtable, clickup, confluence, discord, jira, notion, slack, teams - Improves code reusability and maintainability - No functional changes, pure refactoring
This commit is contained in:
parent
9f66d5ca25
commit
9e27081862
10 changed files with 174 additions and 126 deletions
|
|
@ -16,7 +16,6 @@ from sqlalchemy.future import select
|
|||
|
||||
from app.config import config
|
||||
from app.db import SearchSourceConnector
|
||||
from app.routes.teams_add_connector_route import refresh_teams_token
|
||||
from app.schemas.teams_auth_credentials import TeamsAuthCredentialsBase
|
||||
from app.utils.oauth_security import TokenEncryption
|
||||
|
||||
|
|
@ -146,6 +145,8 @@ class TeamsConnector:
|
|||
)
|
||||
|
||||
# Refresh token
|
||||
# Lazy import to avoid circular dependency
|
||||
from app.routes.teams_add_connector_route import refresh_teams_token
|
||||
connector = await refresh_teams_token(self._session, connector)
|
||||
|
||||
# Reload credentials after refresh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue