Skip to content

Commit

Permalink
Changed swipe right to write to a doc by id of the kittie that swiped
Browse files Browse the repository at this point in the history
  • Loading branch information
vince0656 committed Nov 27, 2019
1 parent 5657010 commit b1b30e7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,14 @@
console.log(`poke [[${pokeId}]] to kittie ${kittieId}`);
},
swipeRight: function (kittieId) {
const uuid = this.$uuid;
const swipeId = uuid.v4();
const stud = this.kitties.user[0];
db.collection('kitties').doc('network').collection('mainnet').doc(kittieId)
.collection('swipeRight')
.doc(swipeId)
.doc(stud)
.set({msg: `Hello treakle, want to breed with ${stud}?`, from: this.accounts.user, stud}, {
merge: true
});
console.log(`swipe [[${swipeId}]] to kittie ${kittieId}`);
console.log(`swipe right from ${stud} to ${kittieId}`);
},
find: async function() {
this.kitties.other = await this.getKittiesForAddressFromDB('mainnet', this.accounts.other);
Expand Down

0 comments on commit b1b30e7

Please sign in to comment.