mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
made sendRequest depend on hasValidAccessToken being true
This commit is contained in:
parent
c90442137c
commit
7c62ed6dac
1 changed files with 7 additions and 3 deletions
|
@ -927,9 +927,13 @@ void DomainGatekeeper::getDomainOwnerFriendsList() {
|
|||
callbackParams.errorCallbackMethod = "getDomainOwnerFriendsListErrorCallback";
|
||||
|
||||
const QString GET_FRIENDS_LIST_PATH = "api/v1/user/friends";
|
||||
DependencyManager::get<AccountManager>()->sendRequest(GET_FRIENDS_LIST_PATH, AccountManagerAuth::Required,
|
||||
QNetworkAccessManager::GetOperation, callbackParams, QByteArray(),
|
||||
NULL, QVariantMap());
|
||||
if (DependencyManager::get<AccountManager>()->hasValidAccessToken())
|
||||
{
|
||||
DependencyManager::get<AccountManager>()->sendRequest(GET_FRIENDS_LIST_PATH, AccountManagerAuth::Required,
|
||||
QNetworkAccessManager::GetOperation, callbackParams, QByteArray(),
|
||||
NULL, QVariantMap());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DomainGatekeeper::getDomainOwnerFriendsListJSONCallback(QNetworkReply& requestReply) {
|
||||
|
|
Loading…
Reference in a new issue