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
|
|
@ -14,7 +14,6 @@ from sqlalchemy.future import select
|
|||
from app.config import config
|
||||
from app.connectors.jira_connector import JiraConnector
|
||||
from app.db import SearchSourceConnector
|
||||
from app.routes.jira_add_connector_route import refresh_jira_token
|
||||
from app.schemas.atlassian_auth_credentials import AtlassianAuthCredentialsBase
|
||||
from app.utils.oauth_security import TokenEncryption
|
||||
|
||||
|
|
@ -167,6 +166,8 @@ class JiraHistoryConnector:
|
|||
)
|
||||
|
||||
# Refresh token
|
||||
# Lazy import to avoid circular dependency
|
||||
from app.routes.jira_add_connector_route import refresh_jira_token
|
||||
connector = await refresh_jira_token(self._session, connector)
|
||||
|
||||
# Reload credentials after refresh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue