Assorted fixes#281
Conversation
| * @static | ||
| */ | ||
| static findOne(id, context) { | ||
| id = String(id) |
There was a problem hiding this comment.
Not sure where findOne's being called with an array of strings, but would we not be better off extracting the real ID string we want from the array before calling this rather than setting up a function definition that's somewhat unclear or ambiguous about what it needs?
There was a problem hiding this comment.
This is only to silence TypeScript because Express considers a param to be either an array or array of strings (String|String[]), even though it never is. Or it certainly never is for how the prototype works currently. Doing this in the models means not having to wrangle types every time one of these methods is called.
| } else if ( | ||
| replies.every(({ given, alternative }) => given && !alternative) | ||
| ) { | ||
| // Conflicting vaccine choice |
There was a problem hiding this comment.
I must be reading this wrong, but I don't get it. Line 228 uses .every and yet we're returning a value that says the consent was inconsistent? "Every" sounds consistent to me.
There was a problem hiding this comment.
Take a look now; think it’s right, certainly clearer too, I hope.
malross
left a comment
There was a problem hiding this comment.
I think it's just the determination of inconsistent consent that needs looking at in getConsentOutcome.
f3de1fe to
f7debb0
Compare
f7debb0 to
7f89514
Compare
7f89514 to
7a320d7
Compare
💅