Skip to content

Conversation

@SunnyCloudYang
Copy link

This pull request adds a new feature that allows users to manually force a re-sync of their analytics data from the Busuanzi service for a verified domain. This is useful when the initial sync fails due to Busuanzi service issues(#26 #27 ). The implementation includes backend API changes, frontend UI updates, and new utility functions for the sync logic.

Backend: API and Sync Logic

  • Added a new POST API endpoint in src/app/api/domains/sync-busuanzi/route.ts that authenticates the user, verifies domain ownership and verification status, and triggers a forced sync from Busuanzi. Handles both full and partial sync failures and returns detailed results.
  • Implemented utility functions in src/utils/busuanzi.ts for force syncing site UV and PV values, and a combined function to sync both in parallel, storing results and error handling.

Frontend: UI and State Management

  • Added a "Sync from Busuanzi" button to the SITE OVERVIEW section in src/app/dashboard/analytics/page.tsx, with loading state and feedback for success, partial failure, or error.
  • Updated state management to track the syncing status for Busuanzi separately (syncingBusuanzi).
  • Added the Download icon for the new sync button.
  • Implemented the syncFromBusuanzi function to call the new API endpoint and reload domain data as needed, with appropriate toast notifications.

@vercel
Copy link

vercel bot commented Jan 11, 2026

@SunnyCloudYang is attempting to deploy a commit to the Evanovation Team on Vercel.

A member of the Team first needs to authorize it.

@SunnyCloudYang SunnyCloudYang marked this pull request as ready for review January 11, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant