Skip to content

Assorted fixes#281

Merged
paulrobertlloyd merged 9 commits into
mainfrom
assorted-fixes
May 11, 2026
Merged

Assorted fixes#281
paulrobertlloyd merged 9 commits into
mainfrom
assorted-fixes

Conversation

@paulrobertlloyd
Copy link
Copy Markdown
Collaborator

💅

@paulrobertlloyd paulrobertlloyd temporarily deployed to mavis-protot-assorted-f-rmxvit May 8, 2026 16:53 Inactive
Comment thread app/models/session.js
* @static
*/
static findOne(id, context) {
id = String(id)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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?

Copy link
Copy Markdown
Collaborator Author

@paulrobertlloyd paulrobertlloyd May 11, 2026

Choose a reason for hiding this comment

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

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.

Comment thread app/utils/reply.js Outdated
} else if (
replies.every(({ given, alternative }) => given && !alternative)
) {
// Conflicting vaccine choice
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Take a look now; think it’s right, certainly clearer too, I hope.

Copy link
Copy Markdown
Collaborator

@malross malross left a comment

Choose a reason for hiding this comment

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

I think it's just the determination of inconsistent consent that needs looking at in getConsentOutcome.

@paulrobertlloyd paulrobertlloyd temporarily deployed to mavis-protot-assorted-f-rmxvit May 11, 2026 13:20 Inactive
@paulrobertlloyd paulrobertlloyd temporarily deployed to mavis-protot-assorted-f-rmxvit May 11, 2026 13:57 Inactive
@paulrobertlloyd paulrobertlloyd merged commit bc5baf6 into main May 11, 2026
1 check passed
@paulrobertlloyd paulrobertlloyd deleted the assorted-fixes branch May 11, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants