-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
src/users/users.repository.ts
Outdated
await Promise.all( | ||
tempIDs.map(async ({ tempID, validFrom, validTo }) => { | ||
await (await this.firestoreDB) | ||
.collection('selfReportedPositiveTempIDs') |
There was a problem hiding this comment.
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? 🙇
There was a problem hiding this comment.
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. 🙏
There was a problem hiding this comment.
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! 👍
src/users/users.repository.ts
Outdated
organizationCode, | ||
randomID, | ||
tempIDs, | ||
}: SetSelfReportedPositiveFlagDto): Promise<void> { |
There was a problem hiding this comment.
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? 🙇
There was a problem hiding this comment.
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!
9449e4f
to
d0895c4
Compare
d0895c4
to
9a29855
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
Thank you. 🙇
Closes #90