Catch user update

This commit is contained in:
James Grugett 2022-02-01 21:35:41 -06:00
parent ca29a43da9
commit 473534bc35

View File

@ -39,9 +39,13 @@ export const updateContractMetrics = functions.pubsub
)
for (const [userId, score] of Object.entries(userScores)) {
await firestore.collection('users').doc(userId).update({
totalPnLCached: score,
})
await firestore
.collection('users')
.doc(userId)
.update({
totalPnLCached: score,
})
.catch((e) => console.log('failed to update user', userId, e))
}
})