removed comments from HomeView.vue
This commit is contained in:
parent
a1afcacfe5
commit
852a89ee71
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<button class="btn btn-primary" @click="fetchData">Get Config</button>
|
<button class="btn btn-primary" @click="fetchCaddyConfig">Get Config</button>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<p> {{ myData }}</p>
|
<p> {{ myData }}</p>
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async fetchData() {
|
async fetchCaddyConfig() {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.error = null;
|
this.error = null;
|
||||||
|
|
||||||
|
|
@ -44,27 +44,6 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// Wait for the above fetch request to complete.
|
|
||||||
// Keep waiting until fetch completes or there is an error
|
|
||||||
/*
|
|
||||||
var isCompleted = false;
|
|
||||||
do {
|
|
||||||
await new Promise(r => setTimeout(r, 2000));
|
|
||||||
if (fetch_data !== null || this.error !== null) {
|
|
||||||
isCompleted = true;
|
|
||||||
}
|
|
||||||
} while (isCompleted === false);
|
|
||||||
*/
|
|
||||||
|
|
||||||
//const response = fetch('http://localhost:2019/config/');
|
|
||||||
//if (!response.ok){
|
|
||||||
// throw new Error (`Http error! status: ${response.status}`);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//const config = (await response).json();
|
|
||||||
//console.log('fetched caddy config!');
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue