Skip to content

Commit

Permalink
fix guilds fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
paglias committed Nov 6, 2017
1 parent 12fd790 commit ad16d31
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
5 changes: 1 addition & 4 deletions website/client/components/groups/discovery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mugen-scroll(
:handler="fetchGuilds",
:should-handle="!loading && !this.hasLoadedAllGuilds",
:handle-on-mount="false",
:handle-on-mount="true",
v-show="loading",
)
span(v-once) {{ $t('loading') }}
Expand Down Expand Up @@ -91,9 +91,6 @@ export default {
},
};
},
created () {
if (!this.$store.state.publicGuilds) this.fetchGuilds();
},
computed: {
filteredGuilds () {
let search = this.search;
Expand Down
8 changes: 0 additions & 8 deletions website/client/store/actions/guilds.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ export async function create (store, payload) {
let response = await axios.post('/api/v3/groups/', payload.group);
let newGroup = response.data.data;

// @TODO: Add party
if (newGroup.privacy === 'public') {
store.state.publicGuilds.push(newGroup);
}

if (newGroup.leader._id === store.state.user.data._id || newGroup.privacy === 'private') {
store.state.myGuilds.push(newGroup);
}
Expand All @@ -112,9 +107,6 @@ export async function update (store, payload) {

let updatedGroup = response.data.data;

// @TODO: Replace old group
// store.state.publicGuilds.push(newGroup);

return updatedGroup;
}

Expand Down
1 change: 0 additions & 1 deletion website/client/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default function () {
'time-travelers': asyncResourceFactory(),
},
myGuilds: [],
publicGuilds: [],
groupFormOptions: {
creatingParty: false,
groupId: '',
Expand Down

0 comments on commit ad16d31

Please sign in to comment.