From 3e6bfdc82a4d7613c92ad663986bc8987e827d53 Mon Sep 17 00:00:00 2001 From: Miodec Date: Sat, 6 Feb 2021 20:24:39 +0000 Subject: [PATCH] stripping data after checking for pb --- functions/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/index.js b/functions/index.js index 2bc738d4b..27b6fc8bb 100644 --- a/functions/index.js +++ b/functions/index.js @@ -1462,14 +1462,14 @@ exports.testCompleted = functions.https.onRequest(async (request, response) => { ), checkIfPB(request.uid, request.obj, userdata), checkIfTagPB(request.uid, request.obj), - stripAndSave(request.uid, request.obj), ]) .then(async (values) => { let globallb = values[0].insertedAt; let dailylb = values[1].insertedAt; let ispb = values[2]; let tagPbs = values[3]; - let createdDocId = values[4].id; + let createdDocId = stripAndSave(request.uid, request.obj); + createdDocId = createdDocId.id; // console.log(values); if (obj.mode === "time" && String(obj.mode2) === "60") {