From f4eae5a16443a09da72664c949363f6ecd72880f Mon Sep 17 00:00:00 2001 From: Thomas Ballmann Date: Sun, 15 Mar 2020 09:46:11 +0100 Subject: [PATCH] add weather reload button for dev --- app/src/api/device.js | 10 ++++++++++ app/src/views/Dashboard.vue | 38 +++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/app/src/api/device.js b/app/src/api/device.js index 7bdd68e..9814506 100644 --- a/app/src/api/device.js +++ b/app/src/api/device.js @@ -145,4 +145,14 @@ export default { .get('/stats') .then(response => cb(response.data)) }, + + /** + * @param cb + * @returns {PromiseLike | Promise} + */ + updateWeather(cb) { + return axios + .get('/api/update?weather=1') + .then(response => cb(response.data)) + }, } diff --git a/app/src/views/Dashboard.vue b/app/src/views/Dashboard.vue index 8e39d50..9fb4616 100644 --- a/app/src/views/Dashboard.vue +++ b/app/src/views/Dashboard.vue @@ -1,28 +1,30 @@ \ No newline at end of file