v1.1.0/release

-fix dose logic
-fix popup icon style
This commit is contained in:
2021-04-22 12:11:23 -04:00
parent 732bd6887c
commit 06b18c14cd
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -234,6 +234,14 @@ export const saveResultV1 = functions.https.onCall(
// Update user result
const cleanData: SaveResultRequestData = Object.assign({}, data);
delete cleanData.gid;
if (cleanData.dose && cleanData.dose === VAX_DOSES.ONE) {
Object.keys(cleanData[VAX_DOSES.TWO]).forEach((symptom) => {
if (cleanData[VAX_DOSES.TWO][symptom] === true) {
cleanData.dose = VAX_DOSES.TWO;
data.dose = VAX_DOSES.TWO;
}
});
}
await admin
.firestore()
.collection("results")