Support scripts/.env path

This commit is contained in:
Hamza-Ayed
2026-07-24 16:49:21 +03:00
parent eacd71349e
commit b47102f36b
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -15,8 +15,8 @@ if (fs.existsSync(envPath)) {
});
}
const USER_TOKEN = process.env.META_ACCESS_TOKEN;
const PAGE_ID = process.env.META_PAGE_ID;
const USER_TOKEN = (process.env.META_ACCESS_TOKEN || '').replace(/\s+/g, '');
const PAGE_ID = (process.env.META_PAGE_ID || '1047354938453381').trim();
if (!USER_TOKEN) {
console.error('ERROR: META_ACCESS_TOKEN is missing in .env file or environment variables.');