I'm developing an app with ionic 3 and firebase, and I'm encountering a problem, because the function I'm calling is not working as expected. I wanted it to return only the requests with this uid
getAll() {
var userId = firebase.auth().currentUser.uid
console.log(userId);
return this.db.list('pedidos', ref => ref.equalTo(userId))
.snapshotChanges()
.map(changes => {
return changes.map(c => ({ key: c.payload.key, ...c.payload.val() }));
})
}