From 6178b76a6778e1f103ae5469a4fa1f909e9f202d Mon Sep 17 00:00:00 2001 From: kaniol-lck <375520360@qq.com> Date: Fri, 12 Jul 2024 14:00:42 +0800 Subject: [PATCH] fix curseforge getFileInfo (import modpacks) --- src/curseforge/curseforgeapi.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/curseforge/curseforgeapi.cpp b/src/curseforge/curseforgeapi.cpp index 5df32ea..9637121 100644 --- a/src/curseforge/curseforgeapi.cpp +++ b/src/curseforge/curseforgeapi.cpp @@ -137,11 +137,11 @@ Reply CurseforgeAPI::getDescription(int id) Reply CurseforgeAPI::getFileInfo(int id, int FileID) { - QUrl url = PREFIX + "/v1/mods/" + QString::number(id) + "/file/" + QString::number(FileID); + QUrl url = PREFIX + "/v1/mods/" + QString::number(id) + "/files/" + QString::number(FileID); QNetworkRequest request(url); MMLogger::network(this) << url; - request.setRawHeader("x-api-key",XAPIKEY); + request.setRawHeader("x-api-key", XAPIKEY); auto reply = accessManager_.get(request); return { reply, [=]{ //parse json