Skip to content

Commit fe914da

Browse files
author
katowulf
authored
Doubles to singles per nivco's request
1 parent d9ebd04 commit fe914da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

child-count/functions/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const admin = require('firebase-admin');
2020
admin.initializeApp(functions.config().firebase);
2121

2222
// Keeps track of the length of the 'likes' child list in a separate property.
23-
exports.countlikechange = functions.database.ref("/posts/{postid}/likes/{likeid}").onWrite((event) => {
23+
exports.countlikechange = functions.database.ref('/posts/{postid}/likes/{likeid}').onWrite((event) => {
2424
var collectionRef = event.data.ref.parent;
2525
var countRef = collectionRef.parent.child('likes_count');
2626

@@ -35,7 +35,7 @@ exports.countlikechange = functions.database.ref("/posts/{postid}/likes/{likeid}
3535
});
3636

3737
// If the number of likes gets deleted, recount the number of likes
38-
exports.recountlikes = functions.database.ref("/posts/{postid}/likes_count").onWrite((event) => {
38+
exports.recountlikes = functions.database.ref('/posts/{postid}/likes_count').onWrite((event) => {
3939
if (!event.data.exists()) {
4040
var counterRef = event.data.ref;
4141
var collectionRef = counterRef.parent.child('likes');

0 commit comments

Comments
 (0)