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
10491049
10501050 // go to coordinate destination or to Username
10511051 if (!goToDestination(destination)) {
1052− // there's a username entered by the user, make a request to the data-server
1053−
1052+ JSONCallbackParameters callbackParams;
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);
10541060 }
10551061 }
10561062