funktioniert das?
}
},
methods: {
diff --git a/frontend/src/pages/CacheStart.vue b/frontend/src/pages/CacheStart.vue
index 2ee2846..faef40b 100644
--- a/frontend/src/pages/CacheStart.vue
+++ b/frontend/src/pages/CacheStart.vue
@@ -52,8 +52,24 @@
console.log("Anfrage erfolgreich");
}) .catch((error) => {
- console.log(error);
- console.log("Anfrage fehlgeschlagen");
+ let msg;
+ let title;
+ if (error.response) {
+ // The request was made and the server responded with a status code
+ title = "Seite konnte nicht gefunden werden!";
+ msg = error.response;
+ } else if (error.request) {
+ // The request was made but no response was received
+ title = "Problem with request!";
+ msg = "Error occured due to wrong server request!"
+ console.log(error.request);
+ } else {
+ // Something happened in setting up the request that triggered an Error
+ title = "Error";
+ msg = error.message;
+ console.log('Error', error.message);
+ }
+ this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { title: title, message: msg})
})
this.$router.push({path: `/station/${params.cacheID}/${params.stationID}`})
},
diff --git a/frontend/src/pages/qr-code-test.vue b/frontend/src/pages/qr-scanner.vue
similarity index 95%
rename from frontend/src/pages/qr-code-test.vue
rename to frontend/src/pages/qr-scanner.vue
index 7bf52e7..087cb71 100644
--- a/frontend/src/pages/qr-code-test.vue
+++ b/frontend/src/pages/qr-scanner.vue
@@ -23,9 +23,6 @@
- Last result: {{ result }}
- Validating: {{ validating }}
- is Valid: {{ isValid }}
diff --git a/frontend/src/router/routes.js b/frontend/src/router/routes.js
index 03e0d36..63e5a11 100644
--- a/frontend/src/router/routes.js
+++ b/frontend/src/router/routes.js
@@ -16,9 +16,9 @@ const routes = [
children: [{ path: "", component: () => import("pages/Cache.vue") }]
},
{
- path: "/qr-code-test/",
+ path: "/qr-scanner/",
component: () => import("layouts/MyLayout.vue"),
- children: [{ path: "", component: () => import("pages/qr-code-test.vue") }]
+ children: [{ path: "", component: () => import("pages/qr-scanner.vue") }]
},
{
path: "/cache/:id",