fix(analytics): auto-heal token status on successful sync

This commit is contained in:
Michael committed 2026-01-21 16:19:58 +01:00
1 parent c37a56b366
commit 7b39b34afb
1 file changed
+6 -2
+6 -2
View File
@@ -221,9 +221,13 @@ export class AnalyticsService {
// Continue execution to save at least the follower count
}
// Update Page
// Update Page - Auto-heal status if sync works
await db.update(socialPages)
.set({ followersCount: followers })
.set({
followersCount: followers,
tokenStatus: 'valid', // If we got here, the token worked!
lastTokenCheck: new Date()
})
.where(eq(socialPages.id, pageId));
// Insert History