refactor: store current capabilities
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
@ -118,7 +118,7 @@ void Download::executeTask()
|
||||
}
|
||||
|
||||
request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8());
|
||||
if (APPLICATION->currentCapabilities() & Application::SupportsFlame
|
||||
if (APPLICATION->capabilities() & Application::SupportsFlame
|
||||
&& request.url().host().contains("api.curseforge.com")) {
|
||||
request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8());
|
||||
};
|
||||
|
@ -216,7 +216,7 @@ namespace Net {
|
||||
}
|
||||
|
||||
request.setHeader(QNetworkRequest::UserAgentHeader, APPLICATION->getUserAgent().toUtf8());
|
||||
if (APPLICATION->currentCapabilities() & Application::SupportsFlame
|
||||
if (APPLICATION->capabilities() & Application::SupportsFlame
|
||||
&& request.url().host().contains("api.curseforge.com")) {
|
||||
request.setRawHeader("x-api-key", APPLICATION->getFlameAPIKey().toUtf8());
|
||||
}
|
||||
|
Reference in New Issue
Block a user