mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:24:08 +02:00
fix go to user and address update for new API
This commit is contained in:
parent
959c225843
commit
7067cf2ab3
3 changed files with 6 additions and 6 deletions
|
@ -3367,9 +3367,9 @@ void Application::connectedToDomain(const QString& hostname) {
|
|||
if (accountManager.isLoggedIn()) {
|
||||
// update our domain-server with the data-server we're logged in with
|
||||
|
||||
QString domainPutJsonString = "{\"location\":{\"domain\":\"" + hostname + "\"}}";
|
||||
QString domainPutJsonString = "{\"address\":{\"domain\":\"" + hostname + "\"}}";
|
||||
|
||||
accountManager.authenticatedRequest("/api/v1/users/location", QNetworkAccessManager::PutOperation,
|
||||
accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
|
||||
JSONCallbackParameters(), domainPutJsonString.toUtf8());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -999,7 +999,7 @@ void Menu::goTo() {
|
|||
callbackParams.jsonCallbackMethod = "goToLocationFromResponse";
|
||||
|
||||
// there's a username entered by the user, make a request to the data-server for the associated location
|
||||
AccountManager::getInstance().authenticatedRequest("/api/v1/users/" + gotoDialog.textValue() + "/location",
|
||||
AccountManager::getInstance().authenticatedRequest("/api/v1/users/" + gotoDialog.textValue() + "/address",
|
||||
QNetworkAccessManager::GetOperation,
|
||||
callbackParams);
|
||||
}
|
||||
|
|
|
@ -1139,10 +1139,10 @@ void MyAvatar::updateLocationInDataServer() {
|
|||
QString orientationString(createByteArray(safeEulerAngles(getOrientation())));
|
||||
|
||||
// construct the json to put the user's location
|
||||
QString locationPutJson = QString() + "{\"location\":{\"position\":\""
|
||||
QString locationPutJson = QString() + "{\"address\":{\"position\":\""
|
||||
+ positionString + "\", \"orientation\":\"" + orientationString + "\"}}";
|
||||
|
||||
accountManager.authenticatedRequest("/api/v1/users/location", QNetworkAccessManager::PutOperation,
|
||||
accountManager.authenticatedRequest("/api/v1/users/address", QNetworkAccessManager::PutOperation,
|
||||
JSONCallbackParameters(), locationPutJson.toUtf8());
|
||||
}
|
||||
}
|
||||
|
@ -1154,7 +1154,7 @@ void MyAvatar::goToLocationFromResponse(const QJsonObject& jsonObject) {
|
|||
// send a node kill request, indicating to other clients that they should play the "disappeared" effect
|
||||
sendKillAvatar();
|
||||
|
||||
QJsonObject locationObject = jsonObject["data"].toObject()["location"].toObject();
|
||||
QJsonObject locationObject = jsonObject["data"].toObject()["address"].toObject();
|
||||
QString positionString = locationObject["position"].toString();
|
||||
QString orientationString = locationObject["orientation"].toString();
|
||||
QString domainHostnameString = locationObject["domain"].toString();
|
||||
|
|
Loading…
Reference in a new issue