Catch user update
This commit is contained in:
parent
ca29a43da9
commit
473534bc35
|
@ -39,9 +39,13 @@ export const updateContractMetrics = functions.pubsub
|
||||||
)
|
)
|
||||||
|
|
||||||
for (const [userId, score] of Object.entries(userScores)) {
|
for (const [userId, score] of Object.entries(userScores)) {
|
||||||
await firestore.collection('users').doc(userId).update({
|
await firestore
|
||||||
totalPnLCached: score,
|
.collection('users')
|
||||||
})
|
.doc(userId)
|
||||||
|
.update({
|
||||||
|
totalPnLCached: score,
|
||||||
|
})
|
||||||
|
.catch((e) => console.log('failed to update user', userId, e))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user