mirror of
https://github.com/romancm/gamebrary
synced 2024-11-23 11:43:07 +00:00
Remove LOAD_PUBIC_BOARD action
This commit is contained in:
parent
1f22bb380f
commit
baf0a5d332
1 changed files with 3 additions and 24 deletions
|
@ -136,9 +136,9 @@ export default {
|
|||
.then((doc) => {
|
||||
const board = doc.data();
|
||||
|
||||
if (state.user.uid !== board.owner) {
|
||||
return reject();
|
||||
}
|
||||
// if (state.user.uid !== board.owner) {
|
||||
// return reject();
|
||||
// }
|
||||
|
||||
commit('SET_ACTIVE_BOARD', {
|
||||
...board,
|
||||
|
@ -150,27 +150,6 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
LOAD_PUBIC_BOARD({ commit }, id) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const db = firestore();
|
||||
|
||||
db.collection('boards')
|
||||
.doc(id)
|
||||
.get()
|
||||
.then((doc) => {
|
||||
const board = doc.data();
|
||||
|
||||
commit('SET_ACTIVE_BOARD', {
|
||||
...board,
|
||||
id: doc.id,
|
||||
});
|
||||
|
||||
return resolve();
|
||||
})
|
||||
.catch(reject);
|
||||
});
|
||||
},
|
||||
|
||||
LOAD_PUBLIC_BOARDS({ commit }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const db = firestore();
|
||||
|
|
Loading…
Reference in a new issue