diff --git a/frontend/src/pages/MyCaches.vue b/frontend/src/pages/MyCaches.vue
index 3a81425..aa82501 100644
--- a/frontend/src/pages/MyCaches.vue
+++ b/frontend/src/pages/MyCaches.vue
@@ -49,7 +49,7 @@
-
@@ -245,6 +245,7 @@
}
this.$axios.get('/api/getMyCaches', {params: {token}})
.then((response) => {
+ console.log(response.data)
this.startedCaches = response.data;
}).catch((error) => {
// Error
@@ -270,16 +271,23 @@
})
},
continueCache(cacheID) {
+ console.log("cacheID")
+ console.log(cacheID)
let currentCache;
- let params;
+ if (localStorage.getItem('userToken')) {
+ let params = {cacheID: cacheID};
+ params.token = JSON.parse(localStorage.getItem('userToken')).token;
+ this.$axios.get('/api/getCurrentStation', {params})
+ .then((response) => {
+ console.log(response.data)
+ })
+ .catch((error) => {
+ });
- this.$axios.get('/api/currentStation', {params})
- .then((response) => {
- })
- .catch((error) => {
- });
+ }
- this.$router.push({path: `/station/${cacheID}`})
+
+ //this.$router.push({path: `/station/${cacheID}`})
},
getPersonalRanking() {
const name = JSON.parse(localStorage.getItem('userToken')).name;
diff --git a/frontend/src/pages/Overview.vue b/frontend/src/pages/Overview.vue
index 89157e5..22575e3 100644
--- a/frontend/src/pages/Overview.vue
+++ b/frontend/src/pages/Overview.vue
@@ -36,7 +36,7 @@
- {{ cache.description }}
+
diff --git a/frontend/src/pages/Register.vue b/frontend/src/pages/Register.vue
index eab75e5..11d7795 100644
--- a/frontend/src/pages/Register.vue
+++ b/frontend/src/pages/Register.vue
@@ -50,7 +50,6 @@
label="Sign up"
color="primary"
class="full-width"
- type="submit"
@click="register()"
unelevated
/>
diff --git a/frontend/src/pages/StationView.vue b/frontend/src/pages/StationView.vue
index 65f8119..a7a7845 100644
--- a/frontend/src/pages/StationView.vue
+++ b/frontend/src/pages/StationView.vue
@@ -55,8 +55,11 @@
cacheID: "",
cacheName: "",
//cache: null,
- cache: null,
- station: null,
+ cache: {
+ name: "",
+ stationen: [],
+ },
+ station: {},
// Following Params belong to QR-Code Scanner
askForPermission: true,
diff --git a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java
index 6bdf3ef..2c6dc5b 100644
--- a/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java
+++ b/src/main/java/hhn/labsw/bugageocaching/controller/Controller.java
@@ -606,7 +606,9 @@ public class Controller {
return ResponseEntity.status(200).body("Ok");
}
+ @CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
@RequestMapping("/api/getCurrentStation")
+ @ResponseBody
public ResponseEntity getStationFromUserAndCache(@RequestParam String token, @RequestParam String cacheID){
// verify user
@@ -641,6 +643,7 @@ public class Controller {
return ResponseEntity.status(200).body(bearbeitetRepository.findByUserAndCache(user, cache));
}
+ @CrossOrigin(origins = "*", allowedHeaders = "*") // only for dev purpose
@RequestMapping("/api/hello")
public ResponseEntity hello(@RequestParam String name) {
return ResponseEntity.status(200).body(userRepository.getRankingPlaceFromUser(name));