fix federation widged (#8221)

The variables accidentally shadowed the variables that contain the ref's
to be rendered into the template.
This commit is contained in:
Johann150 2022-01-30 13:48:40 +01:00 committed by GitHub
parent 55b3ae22ee
commit ea5148ca0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,13 +54,13 @@ const charts = ref([]);
const fetching = ref(true); const fetching = ref(true);
const fetch = async () => { const fetch = async () => {
const instances = await os.api('federation/instances', { const fetchedInstances = await os.api('federation/instances', {
sort: '+lastCommunicatedAt', sort: '+lastCommunicatedAt',
limit: 5 limit: 5
}); });
const charts = await Promise.all(instances.map(i => os.api('charts/instance', { host: i.host, limit: 16, span: 'hour' }))); const fetchedCharts = await Promise.all(instances.map(i => os.api('charts/instance', { host: i.host, limit: 16, span: 'hour' })));
instances.value = instances; instances.value = fetchedInstances;
charts.value = charts; charts.value = fetchedCharts;
fetching.value = false; fetching.value = false;
}; };