style(admin): fix ESLint curly rule violations in sync.js

为单行 if 语句添加花括号以符合 ESLint curly 规则要求
This commit is contained in:
IanShaw027
2025-12-24 17:57:30 -08:00
parent 11c38b23d1
commit b88698191e

View File

@@ -191,8 +191,12 @@ router.get('/sync/export-accounts', authenticateAdmin, async (req, res) => {
token_type: 'Bearer' token_type: 'Bearer'
} }
// 🔧 Add auth info as top-level credentials fields // 🔧 Add auth info as top-level credentials fields
if (orgUuid) credentials.org_uuid = orgUuid if (orgUuid) {
if (accountUuid) credentials.account_uuid = accountUuid credentials.org_uuid = orgUuid
}
if (accountUuid) {
credentials.account_uuid = accountUuid
}
// 🔧 Store complete original CRS data in extra // 🔧 Store complete original CRS data in extra
const extra = { const extra = {
@@ -337,9 +341,15 @@ router.get('/sync/export-accounts', authenticateAdmin, async (req, res) => {
token_type: 'Bearer' token_type: 'Bearer'
} }
// 🔧 Add auth info as top-level credentials fields // 🔧 Add auth info as top-level credentials fields
if (account.accountId) credentials.chatgpt_account_id = account.accountId if (account.accountId) {
if (account.chatgptUserId) credentials.chatgpt_user_id = account.chatgptUserId credentials.chatgpt_account_id = account.accountId
if (account.organizationId) credentials.organization_id = account.organizationId }
if (account.chatgptUserId) {
credentials.chatgpt_user_id = account.chatgptUserId
}
if (account.organizationId) {
credentials.organization_id = account.organizationId
}
// 🔧 Store complete original CRS data in extra // 🔧 Store complete original CRS data in extra
const extra = { const extra = {