File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -122,22 +122,22 @@ exports.resultCounter = functions.database.ref('/v2/results/{projectId}/{groupId
122122// Counters to keep track of contributors and project contributions of Project and User.
123123// Gets triggered when User contributes to new project.
124124exports . contributionCounter = functions . database . ref ( '/v2/users/{userId}/contributions/{projectId}/' ) . onCreate ( ( snapshot , context ) => {
125- const promises = [ ]
125+ const promises_2 = [ ]
126126 // Firebase Realtime Database references
127127 const contributorCountRef = admin . database ( ) . ref ( '/v2/projects/' + context . params . projectId + '/contributorCount' )
128128 const projectContributionCountRef = admin . database ( ) . ref ( '/v2/users/' + context . params . userId + '/projectContributionCount' )
129129
130130 const projectContributionCount = projectContributionCountRef . transaction ( ( currentCount ) => {
131131 return currentCount + 1
132132 } )
133- promises . push ( projectContributionCount )
133+ promises_2 . push ( projectContributionCount )
134134
135135 const contributorCount = contributorCountRef . transaction ( ( currentCount ) => {
136136 return currentCount + 1
137137 } )
138- promises . push ( contributorCount )
138+ promises_2 . push ( contributorCount )
139139
140- return Promise . all ( promises )
140+ return Promise . all ( promises_2 )
141141} )
142142
143143// Increment project.resultCount by group.numberOfTasks.
You can’t perform that action at this time.
0 commit comments