Showing the changes to interface/src/Menu.cpp (1 of 4 files). Show all
Unified · Split
| @@ -1049,8 +1049,14 @@ void Menu::goTo() { · 1048 unmodified lines | ||
| 1049 | 1049 | |
| 1050 | 1050 | // go to coordinate destination or to Username |
| 1051 | 1051 | 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); | |
| 1054 | 1060 | } |
| 1055 | 1061 | } |
| 1056 | 1062 | |