Guard against accidentally calling wrong api/v1/places endpoint

spaces
This commit is contained in:
David Kelly 2019-02-20 10:18:55 -07:00
parent e77cdfc0d2
commit 2202b69575
3 changed files with 10 additions and 3 deletions

View file

@ -315,9 +315,11 @@ bool AddressManager::handleUrl(const QUrl& lookupUrl, LookupTrigger trigger) {
// wasn't an address - lookup the place name
// we may have a path that defines a relative viewpoint - pass that through the lookup so we can go to it after
if (!lookupUrl.host().isNull() && !lookupUrl.host().isEmpty()) {
attemptPlaceNameLookup(lookupUrl.host(), lookupUrl.path(), trigger);
}
}
}
return true;

View file

@ -325,6 +325,11 @@
leftMargin: domainNameLeftMargin
};
// check to be sure we are going to look for an actual domain
if (!domain) {
doRequest = false;
}
if (doRequest) {
var url = Account.metaverseServerURL + '/api/v1/places/' + domain;
request({