🔱 GOD MODE: Auto-uses GOD_MODE_TOKEN for ALL requests

- GOD_MODE_TOKEN is now primary auth (no admin token needed)
- Sends both X-God-Token header AND Authorization Bearer
- Falls back to ADMIN_TOKEN only if no God token set
This commit is contained in:
cawcenter
2025-12-14 14:57:46 -05:00
parent bc6839919c
commit 212e951b78

View File

@@ -64,10 +64,12 @@ function request(method, path, data = null, useGodMode = false) {
'User-Agent': 'SparkGodMode/1.0'
};
// Authentication
if (useGodMode && CONFIG.GOD_MODE_TOKEN) {
// GOD MODE TOKEN is primary - always use it if available
if (CONFIG.GOD_MODE_TOKEN) {
headers['X-God-Token'] = CONFIG.GOD_MODE_TOKEN;
headers['Authorization'] = `Bearer ${CONFIG.GOD_MODE_TOKEN}`;
} else if (CONFIG.ADMIN_TOKEN) {
// Fallback only if no God token
headers['Authorization'] = `Bearer ${CONFIG.ADMIN_TOKEN}`;
}