mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-09 12:56:07 +08:00
added missing returns and = signs
This commit is contained in:
parent
249dae1161
commit
8c90d8ed9b
1 changed files with 3 additions and 2 deletions
|
|
@ -19,10 +19,10 @@ admin.initializeApp({
|
|||
|
||||
exports.moveResults = functions.https.onCall((request,response) => {
|
||||
|
||||
admin.firestore().collection('results').get().then(data => {
|
||||
return admin.firestore().collection('results').get().then(data => {
|
||||
data.docs.forEach(doc => {
|
||||
let result = doc.data();
|
||||
if(result.moved == undefined || result.moved == false){
|
||||
if(result.moved === undefined || result.moved === false){
|
||||
admin.firestore().collection(`results`).doc(doc.id).update({moved:true});
|
||||
admin.firestore().collection(`users/${result.uid}/results`).add(result);
|
||||
console.log(`moving doc ${doc.id}`);
|
||||
|
|
@ -30,6 +30,7 @@ exports.moveResults = functions.https.onCall((request,response) => {
|
|||
console.log(`doc already moved`);
|
||||
}
|
||||
})
|
||||
return
|
||||
})
|
||||
|
||||
})
|
||||
Loading…
Add table
Reference in a new issue