Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Commit

Permalink
fix room mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
becca committed Mar 22, 2020
1 parent d7c61ab commit 6f0e5e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions frontend/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ const getters = {
},
async rooms() {
if (store.rooms) {
console.log(store.rooms);
return store.rooms;
} else {
return api.rooms().then(rooms => {
console.log(rooms);
if (!rooms.error) {
Vue.set(store, "rooms", rooms);
}
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/Rooms.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<router-link
v-bind:key="room.id"
:to="{
name: 'raum',
name: 'room',
params: {
routeName: room.ID + '-' + getRouterString(room.Name)
}
Expand All @@ -31,12 +31,12 @@ export default {
components: {
RoomCard
},
data() {},
asyncComputed: {
...mapGetters(["rooms"])
},
methods: {
getRouterString(item) {
console.log(item);
return item
.toString()
.toLowerCase()
Expand Down

0 comments on commit 6f0e5e0

Please sign in to comment.