History

hook to request user's location from data-server

Stephen Birarda committed 12 years ago

Commit 52a21d41 parent 625299e4 files · +13 −3Browse files

Showing the changes to interface/src/Menu.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Menu.cpp+8−2
@@ -1049,8 +1049,14 @@ void Menu::goTo() { · 1048 unmodified lines
1049 1049
1050 // go to coordinate destination or to Username1050 // go to coordinate destination or to Username
1051 if (!goToDestination(destination)) {1051 if (!goToDestination(destination)) {
1052 // there's a username entered by the user, make a request to the data-server1052 JSONCallbackParameters callbackParams;
1053 1053 callbackParams.jsonCallbackReceiver = Application::getInstance()->getAvatar();
1054 callbackParams.jsonCallbackMethod = "goToLocationFromResponse";
1055
1056 // there's a username entered by the user, make a request to the data-server for the associated location
1057 AccountManager::getInstance().authenticatedRequest("/api/v1/users/" + gotoDialog.textValue() + "/location",
1058 QNetworkAccessManager::GetOperation,
1059 callbackParams);
1054 }1060 }
1055 }1061 }
1056 1062