I am trying to make an 'in' query like this: db.collection('units').where('SuperID', 'in', payload)
SuperID: is a number
payload: is an array of numbers matching the SuperIDs
I am doing this so I can group users based off a document like this
Vuex Store
getgs: firestoreAction(({ bindFirestoreRef, payload }) => {
//return the promise returned by 'bindFirestoreRef'
return bindFirestoreRef('gs', db.collection('units').where('SuperID', 'in', payload))
}),
Method
methods: {
...mapActions(['getgs']),
ggs(payload){
console.log(payload)
this.getgs(payload)
}
}
Whenever I try to call it, it logs the array that I need but then says that its undefined and throws the Firebase error.