This commit is contained in:
AMIAY
2026-01-25 13:31:08 +01:00
parent f07e4a2004
commit b11b78f7dc
13 changed files with 465 additions and 490 deletions

View File

@@ -6,7 +6,7 @@ const { getModsPath, getProfilesDir } = require('../core/paths');
const { saveModsToConfig, loadModsFromConfig } = require('../core/config');
const profileManager = require('./profileManager');
const CF_API_KEY = "$2a$10$bqk254NMZOWVTzLVJCcxEOmhcyUujKxA5xk.kQCN9q0KNYFJd5b32";
const API_KEY = "$2a$10$bqk254NMZOWVTzLVJCcxEOmhcyUujKxA5xk.kQCN9q0KNYFJd5b32";
/**
* Get the physical mods path for a specific profile.
@@ -120,7 +120,7 @@ async function downloadMod(modInfo) {
if (!downloadUrl && modInfo.fileId && modInfo.modId) {
const response = await axios.get(`https://api.curseforge.com/v1/mods/${modInfo.modId || modInfo.curseForgeId}/files/${modInfo.fileId || modInfo.curseForgeFileId}`, {
headers: {
'x-api-key': modInfo.apiKey || CF_API_KEY,
'x-api-key': modInfo.apiKey || API_KEY,
'Accept': 'application/json'
}
});
@@ -393,7 +393,7 @@ async function syncModsForCurrentProfile() {
...mod,
modId: mod.curseForgeId,
fileId: mod.curseForgeFileId || mod.fileId,
apiKey: CF_API_KEY
apiKey: API_KEY
});
} catch (err) {
console.error(`[ModManager] Auto-repair failed for "${mod.name}": ${err.message}`);