mirror of
https://github.com/bastienwirtz/homer.git
synced 2025-06-26 20:51:37 +02:00
returning fetch to make fetchServerStatus
awaitable
Co-authored-by: Bastien Wirtz <bastien.wirtz@gmail.com>
This commit is contained in:
parent
c53c3957d5
commit
ce4d3a3dbe
@ -93,7 +93,7 @@ export default {
|
|||||||
fetchServerStatus: async function () {
|
fetchServerStatus: async function () {
|
||||||
const headers = this.headers;
|
const headers = this.headers;
|
||||||
|
|
||||||
this.fetch("/api/", { headers })
|
return this.fetch("/api/", { headers })
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response && response.message) this.status = "running";
|
if (response && response.message) this.status = "running";
|
||||||
else throw new Error();
|
else throw new Error();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user