const fs = require('fs');
const files = ['merchant-dashboard.html', 'merchant-orders.html', 'merchant-products.html', 'merchant-profile.html', 'merchant-conversations.html', 'merchant-notifications.html'];
files.forEach(f => {
    let p = 'public_html/' + f;
    let c = fs.readFileSync(p, 'utf8');
    c = c.replace(/window\.Auth\.logout\(\)/g, "window.Auth.logout('client-login.html')");
    fs.writeFileSync(p, c);
    console.log(f + ' updated');
});
