Guest User

Untitled

a guest
Sep 14th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. exports.handleVoteKarma = functions.database
  2. .ref('upvotes/{postId}')
  3. .onUpdate(async change => {
  4. const scoreBefore = change.before.val() || 0;
  5. const scoreAfter = change.after.val();
  6. //This {postId} should be the same as the one above for the upvotes/{postId}
  7. adb.ref('{item}/{loc}/{postId}/score').once('value').then((usr) => {
  8.  
  9. });
  10. return null;
  11. });
Add Comment
Please, Sign In to add comment