This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1#!/usr/bin/env node 2 3/** 4 * Restore script for OAuth migration 5 * 6 * This script restores the original OAuth implementation after testing 7 * Run with: node restore-oauth.js 8 */ 9 10const fs = require('fs'); 11const path = require('path'); 12 13const LAYOUT_PATH = path.join(__dirname, 'app/src/app/layout.tsx'); 14const BACKUP_PATH = path.join(__dirname, 'app/src/app/layout.tsx.backup'); 15 16function restore() { 17 try { 18 // Check if backup exists 19 if (!fs.existsSync(BACKUP_PATH)) { 20 console.log('⚠️ No backup found - nothing to restore'); 21 return; 22 } 23 24 // Read backup content 25 const backupContent = fs.readFileSync(BACKUP_PATH, 'utf8'); 26 27 // Restore the original file 28 fs.writeFileSync(LAYOUT_PATH, backupContent); 29 console.log('✅ Restored original layout.tsx'); 30 31 // Remove backup file 32 fs.unlinkSync(BACKUP_PATH); 33 console.log('✅ Cleaned up backup file'); 34 35 console.log('\n🔄 Restoration Complete!'); 36 console.log(''); 37 console.log('The app is now using the original OAuth implementation.'); 38 console.log(''); 39 40 } catch (error) { 41 console.error('❌ Error restoring layout:', error.message); 42 } 43} 44 45// Main execution 46console.log('🔄 Restoring original OAuth implementation...\n'); 47restore();