v1.1.0/release
-fix dose logic -fix popup icon style
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user