const fs = require('fs');
const content = fs.readFileSync('./dist/server.cjs', 'utf8');

const targetIdx = content.indexOf('app.post("/api/mikrotik/update-hotspot-profile"');
if (targetIdx !== -1) {
    console.log("Found update-hotspot-profile at:", targetIdx);
    const endIdx = content.indexOf('app.post(', targetIdx + 10);
    console.log(content.substring(targetIdx, endIdx !== -1 ? endIdx : targetIdx + 3000));
} else {
    console.log("Not found");
}
