mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-24 07:28:11 +02:00
fix(analytics): auto-heal token status on successful sync
This commit is contained in:
1 parent
c37a56b366
commit
7b39b34afb
1 file changed
+6
-2
@@ -221,9 +221,13 @@ export class AnalyticsService {
|
|||||||
// Continue execution to save at least the follower count
|
// Continue execution to save at least the follower count
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update Page
|
// Update Page - Auto-heal status if sync works
|
||||||
await db.update(socialPages)
|
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));
|
.where(eq(socialPages.id, pageId));
|
||||||
|
|
||||||
// Insert History
|
// Insert History
|
||||||
|
|||||||
Reference in new issue
Block a user