From ed96e2f86277a1cb4998a4e4e92782640a45cb44 Mon Sep 17 00:00:00 2001 From: Jack Date: Sun, 7 Jun 2020 23:52:45 +0100 Subject: [PATCH] restructured cloud function --- functions/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functions/index.js b/functions/index.js index 6f1384ed7..f83c9f8a4 100644 --- a/functions/index.js +++ b/functions/index.js @@ -173,11 +173,11 @@ exports.checkIfNeedsToChangeName = functions.https.onCall((request,response) => }) exports.testCompleted = functions.https.onCall((request,response) => { - if(request.uid === undefined || request.obj === undefined){ - console.error(`error saving result for ${request.uid} - missing input`); - return -1; - } try{ + if(request.uid === undefined || request.obj === undefined){ + console.error(`error saving result for ${request.uid} - missing input`); + return -1; + } let obj = request.obj;