Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Change POST /users/me/self_reported_positives to accept TempIDs #96

Merged
merged 4 commits into from
May 2, 2020

Conversation

shogo-mitomo
Copy link
Member

Closes #90

@shogo-mitomo shogo-mitomo self-assigned this May 1, 2020
@shogo-mitomo shogo-mitomo added the enhancement New feature or request label May 1, 2020
await Promise.all(
tempIDs.map(async ({ tempID, validFrom, validTo }) => {
await (await this.firestoreDB)
.collection('selfReportedPositiveTempIDs')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shogo-mitomo
The DFD has DB name as diagnosisKeys-for-org Database, shall we also have a collection name which at least has the word org in it? 🙇

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shogo-mitomo I think we should also add the word org in this class name SetSelfReportedPositiveFlagDto. 🙇
It will avoid any confusion if this is health-center or org case. 🙏

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yashmurty Thanks! Let's use the same name as the DFD! 👍

organizationCode,
randomID,
tempIDs,
}: SetSelfReportedPositiveFlagDto): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the param for this function, can we use a variable name, instead of the current object structure?
I think something like this would be more easier to read

async setSelfReportedPositiveFlag(setSelfReportedPositiveFlag: SetSelfReportedPositiveFlagDto): Promise<void> {
    const { organizationCode,  randomID, tempIDs } = setSelfReportedPositiveFlag
    ...
}

What do you think? 🙇

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yashmurty I don't have a policy on that 🤣 It might be easier to read, indeed. Let's go with that style!

Copy link
Member

@yashmurty yashmurty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉
Thank you. 🙇

@shogo-mitomo shogo-mitomo merged commit 92c62d9 into master May 2, 2020
@shogo-mitomo shogo-mitomo deleted the mitomo/positive_temp_ids branch May 2, 2020 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SpecChange] Change POST /users/me/self_reported_positives to accept TempIDs for the last 14 days
2 participants