mirror of
https://github.com/decolua/9router.git
synced 2026-05-08 12:01:28 +00:00
23 lines
563 B
JavaScript
23 lines
563 B
JavaScript
import initializeCloudSync from "@/shared/services/initializeCloudSync";
|
|
|
|
// Initialize cloud sync when this module is imported
|
|
let initialized = false;
|
|
|
|
export async function ensureCloudSyncInitialized() {
|
|
if (!initialized) {
|
|
try {
|
|
await initializeCloudSync();
|
|
initialized = true;
|
|
} catch (error) {
|
|
console.error("[ServerInit] Error initializing cloud sync:", error);
|
|
}
|
|
}
|
|
return initialized;
|
|
}
|
|
|
|
// Auto-initialize when module loads
|
|
ensureCloudSyncInitialized().catch(console.log);
|
|
|
|
export default ensureCloudSyncInitialized;
|
|
|