1
0
Fork 0
basking-dashboard/src/assets/app.js
2019-05-15 22:54:03 -05:00

20 lines
450 B
JavaScript

new Vue({
el: '#app',
data: {
lastBuildDate: '',
fetchingLastBuildDate: true,
},
created() {
this.fetchLastBuildDate();
},
methods: {
async fetchLastBuildDate() {
this.fetchingLastBuildDate = true;
try {
let { data } = await axios.get('/api/builddate');
this.lastBuildDate = data.pretty;
this.fetchingLastBuildDate = false;
} catch (err) { throw new Error(err); }
},
},
});