From ab63598a1cd3214bfe0744385de12348ce94b53f Mon Sep 17 00:00:00 2001 From: Flowing Date: Tue, 10 Mar 2020 11:35:42 +0900 Subject: [PATCH] Added TryFunction(URL) on front-end. --- web/src/utils/api.vue | 10 ++++++++++ web/src/views/Home.vue | 2 ++ 2 files changed, 12 insertions(+) diff --git a/web/src/utils/api.vue b/web/src/utils/api.vue index 11ed1a0..e857b42 100644 --- a/web/src/utils/api.vue +++ b/web/src/utils/api.vue @@ -25,6 +25,16 @@ export default { } catch (err) { throw new Error(err); } + }, + async TryFunction(url){ + try{ + await this.axios.get(url); + }catch(err){ + this.$notify.error({ + title: "Error", + message: err + }) + } } } }; diff --git a/web/src/views/Home.vue b/web/src/views/Home.vue index a4bde38..32fb51c 100644 --- a/web/src/views/Home.vue +++ b/web/src/views/Home.vue @@ -58,6 +58,8 @@ Flush queries + + Try!