|
@@ -4,6 +4,7 @@
|
|
|
<meta charset="utf-8">
|
|
|
<title>Vue.js markdown editor example</title>
|
|
|
<link rel="stylesheet" href="css/style.css">
|
|
|
+ <script src="js/util.js"></script>
|
|
|
<script src="js/moment.js"></script>
|
|
|
<script src="js/vue.js"></script>
|
|
|
</head>
|
|
@@ -50,6 +51,7 @@
|
|
|
},
|
|
|
update: function (event) {
|
|
|
fetch('/log/'+this.lastID, {method: "GET"})
|
|
|
+ .then(handleErrors)
|
|
|
.then((response) => {
|
|
|
return response.json();
|
|
|
})
|
|
@@ -57,7 +59,13 @@
|
|
|
console.log(JSON.stringify(myJson));
|
|
|
this.$data.log=this.$data.log.concat(myJson.entries);
|
|
|
this.$data.lastID=myJson.lastID;
|
|
|
- });
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.$data.lastID=0;3
|
|
|
+ this.$data.log=[];
|
|
|
+ console.log(error)
|
|
|
+ } );
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
})
|