mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix windows-specific compilation error
This commit is contained in:
parent
bf0b5d08d8
commit
752992760b
|
@ -77,7 +77,7 @@ void TwitchAccount::loadIgnores()
|
|||
QString url("https://api.twitch.tv/kraken/users/" + this->getUserId() + "/blocks");
|
||||
|
||||
util::NetworkRequest req(url);
|
||||
req.setRequestType(util::NetworkRequest::GET);
|
||||
req.setRequestType(util::NetworkRequest::GetRequest);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.makeAuthorizedV5(this->getOAuthClient(), this->getOAuthToken());
|
||||
req.onSuccess([=](const rapidjson::Document &document) {
|
||||
|
@ -125,7 +125,7 @@ void TwitchAccount::ignore(const QString &targetName,
|
|||
targetUserID);
|
||||
|
||||
util::NetworkRequest req(url);
|
||||
req.setRequestType(util::NetworkRequest::PUT);
|
||||
req.setRequestType(util::NetworkRequest::PutRequest);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.makeAuthorizedV5(this->getOAuthClient(), this->getOAuthToken());
|
||||
|
||||
|
@ -177,7 +177,7 @@ void TwitchAccount::unignore(const QString &targetName,
|
|||
targetUserID);
|
||||
|
||||
util::NetworkRequest req(url);
|
||||
req.setRequestType(util::NetworkRequest::DELETE);
|
||||
req.setRequestType(util::NetworkRequest::DeleteRequest);
|
||||
req.setCaller(QThread::currentThread());
|
||||
req.makeAuthorizedV5(this->getOAuthClient(), this->getOAuthToken());
|
||||
|
||||
|
|
|
@ -64,10 +64,10 @@ class NetworkRequest
|
|||
{
|
||||
public:
|
||||
enum RequestType {
|
||||
GET,
|
||||
POST,
|
||||
PUT,
|
||||
DELETE,
|
||||
GetRequest,
|
||||
PostRequest,
|
||||
PutRequest,
|
||||
DeleteRequest,
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -302,16 +302,16 @@ public:
|
|||
void execute()
|
||||
{
|
||||
switch (this->data.requestType) {
|
||||
case GET: {
|
||||
case GetRequest: {
|
||||
this->executeGet();
|
||||
} break;
|
||||
|
||||
case PUT: {
|
||||
case PutRequest: {
|
||||
debug::Log("Call PUT request!");
|
||||
this->executePut();
|
||||
} break;
|
||||
|
||||
case DELETE: {
|
||||
case DeleteRequest: {
|
||||
debug::Log("Call DELETE request!");
|
||||
this->executeDelete();
|
||||
} break;
|
||||
|
@ -394,15 +394,15 @@ private:
|
|||
[timer, data = std::move(this->data), worker]() {
|
||||
QNetworkReply *reply;
|
||||
switch (data.requestType) {
|
||||
case GET: {
|
||||
case GetRequest: {
|
||||
reply = NetworkManager::NaM.get(data.request);
|
||||
} break;
|
||||
|
||||
case PUT: {
|
||||
case PutRequest: {
|
||||
reply = NetworkManager::NaM.put(data.request, data.payload);
|
||||
} break;
|
||||
|
||||
case DELETE: {
|
||||
case DeleteRequest: {
|
||||
reply = NetworkManager::NaM.deleteResource(data.request);
|
||||
} break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue