mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 09:09:56 +02:00
formatting changes and added axios license
Updates following comment from ctrlaltdavid
This commit is contained in:
parent
481125f978
commit
1a02b918d7
2 changed files with 34 additions and 16 deletions
|
@ -306,13 +306,13 @@
|
||||||
if (locationData != null) {
|
if (locationData != null) {
|
||||||
for (var i = 0; i < locationData.length; i++) {
|
for (var i = 0; i < locationData.length; i++) {
|
||||||
joinedData.push({
|
joinedData.push({
|
||||||
"index": joinedData.length
|
"index": joinedData.length,
|
||||||
, "location": locationData[i].Visit
|
"location": locationData[i].Visit,
|
||||||
, "name": locationData[i]['Domain Name']
|
"name": locationData[i]['Domain Name'],
|
||||||
, "owner": locationData[i].Owner
|
"owner": locationData[i].Owner,
|
||||||
, "userCount": locationData[i].People
|
"userCount": locationData[i].People,
|
||||||
, "description": ""
|
"description": "",
|
||||||
, "thumbnail": ""
|
"thumbnail": ""
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -325,13 +325,13 @@
|
||||||
for (var i = 0; i < placesData.length; i++) {
|
for (var i = 0; i < placesData.length; i++) {
|
||||||
if (placesData[i].domain.active && placesData[i].visibility == "open" && new Date(placesData[i].last_activity_update) > activeThresholdTime) {
|
if (placesData[i].domain.active && placesData[i].visibility == "open" && new Date(placesData[i].last_activity_update) > activeThresholdTime) {
|
||||||
joinedData.push({
|
joinedData.push({
|
||||||
"index": joinedData.length
|
"index": joinedData.length,
|
||||||
, "location": placesData[i].address
|
"location": placesData[i].address,
|
||||||
, "name": placesData[i].name
|
"name": placesData[i].name,
|
||||||
, "owner": placesData[i].managers[0]
|
"owner": placesData[i].managers[0],
|
||||||
, "userCount": placesData[i].current_attendance
|
"userCount": placesData[i].current_attendance,
|
||||||
, "description": placesData[i].description
|
"description": placesData[i].description,
|
||||||
, "thumbnail": placesData[i].thumbnail
|
"thumbnail": placesData[i].thumbnail
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -353,11 +353,10 @@
|
||||||
|
|
||||||
// if metaverse data not loaded fire a request for it
|
// if metaverse data not loaded fire a request for it
|
||||||
if (placesData == null) {
|
if (placesData == null) {
|
||||||
// TODO: fire off data get against the metaverse
|
// fire off data get against the metaverse
|
||||||
axios.get("https://metaverse.vircadia.com/live/api/v1/places")
|
axios.get("https://metaverse.vircadia.com/live/api/v1/places")
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
placesData = response.data.data.places;
|
placesData = response.data.data.places;
|
||||||
|
|
||||||
exploreComponent.updateData(blendedData());
|
exploreComponent.updateData(blendedData());
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
|
|
19
scripts/communityScripts/libraries/axios/LICENSE
Normal file
19
scripts/communityScripts/libraries/axios/LICENSE
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
Copyright (c) 2014-present Matt Zabriskie
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
Loading…
Reference in a new issue