fix: 修复claude SSE捕获usage问题

This commit is contained in:
shaw
2025-10-12 23:05:48 +08:00
parent 6f6c274877
commit a67c34bee1
9 changed files with 43 additions and 42 deletions

View File

@@ -146,9 +146,7 @@ async function createAccount(accountData) {
isActive: accountData.isActive !== false ? 'true' : 'false',
status: 'active',
schedulable: accountData.schedulable !== false ? 'true' : 'false',
subscriptionExpiresAt: normalizeSubscriptionExpiresAt(
accountData.subscriptionExpiresAt || ''
),
subscriptionExpiresAt: normalizeSubscriptionExpiresAt(accountData.subscriptionExpiresAt || ''),
createdAt: now,
updatedAt: now
}
@@ -243,9 +241,7 @@ async function updateAccount(accountId, updates) {
}
if (Object.prototype.hasOwnProperty.call(updates, 'subscriptionExpiresAt')) {
updates.subscriptionExpiresAt = normalizeSubscriptionExpiresAt(
updates.subscriptionExpiresAt
)
updates.subscriptionExpiresAt = normalizeSubscriptionExpiresAt(updates.subscriptionExpiresAt)
} else if (Object.prototype.hasOwnProperty.call(updates, 'expiresAt')) {
updates.subscriptionExpiresAt = normalizeSubscriptionExpiresAt(updates.expiresAt)
delete updates.expiresAt