mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-04 05:50:25 +02:00
Apply suggestions from code review
Co-authored-by: David Rowe <david@ctrlaltstudio.com>
This commit is contained in:
parent
3610446150
commit
fd5b84b6eb
2 changed files with 4 additions and 8 deletions
|
@ -695,7 +695,7 @@ void AccountManager::setAccessTokens(const QString& response) {
|
||||||
} else {
|
} else {
|
||||||
// clear the path from the response URL so we have the right root URL for this access token
|
// clear the path from the response URL so we have the right root URL for this access token
|
||||||
QUrl rootURL = rootObject.contains("url") ? rootObject["url"].toString() : _authURL;
|
QUrl rootURL = rootObject.contains("url") ? rootObject["url"].toString() : _authURL;
|
||||||
rootURL.setPath(getMetaverseServerURLPath() + "");
|
rootURL.setPath(getMetaverseServerURLPath());
|
||||||
|
|
||||||
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
|
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
|
||||||
|
|
||||||
|
@ -730,7 +730,7 @@ void AccountManager::requestAccessTokenFinished() {
|
||||||
} else {
|
} else {
|
||||||
// clear the path from the response URL so we have the right root URL for this access token
|
// clear the path from the response URL so we have the right root URL for this access token
|
||||||
QUrl rootURL = requestReply->url();
|
QUrl rootURL = requestReply->url();
|
||||||
rootURL.setPath(getMetaverseServerURLPath() + "");
|
rootURL.setPath(getMetaverseServerURLPath());
|
||||||
|
|
||||||
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
|
qCDebug(networking) << "Storing an account with access-token for" << qPrintable(rootURL.toString());
|
||||||
|
|
||||||
|
@ -766,7 +766,7 @@ void AccountManager::refreshAccessTokenFinished() {
|
||||||
} else {
|
} else {
|
||||||
// clear the path from the response URL so we have the right root URL for this access token
|
// clear the path from the response URL so we have the right root URL for this access token
|
||||||
QUrl rootURL = requestReply->url();
|
QUrl rootURL = requestReply->url();
|
||||||
rootURL.setPath(getMetaverseServerURLPath() + "");
|
rootURL.setPath(getMetaverseServerURLPath());
|
||||||
|
|
||||||
qCDebug(networking) << "Storing an account with a refreshed access-token for" << qPrintable(rootURL.toString());
|
qCDebug(networking) << "Storing an account with a refreshed access-token for" << qPrintable(rootURL.toString());
|
||||||
|
|
||||||
|
|
|
@ -39,11 +39,7 @@ namespace MetaverseAPI {
|
||||||
QString getCurrentMetaverseServerURLPath(bool appendForwardSlash){
|
QString getCurrentMetaverseServerURLPath(bool appendForwardSlash){
|
||||||
QString path = getCurrentMetaverseServerURL().path();
|
QString path = getCurrentMetaverseServerURL().path();
|
||||||
|
|
||||||
if (path.isEmpty()) {
|
if (!path.isEmpty() && appendForwardSlash) {
|
||||||
return path;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (appendForwardSlash) {
|
|
||||||
path.append("/");
|
path.append("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue