-
Notifications
You must be signed in to change notification settings - Fork 348
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
server centralize request validation for co-location and reduced redundancy #3228
server centralize request validation for co-location and reduced redundancy #3228
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Someone is attempting to deploy a commit to the Medplum Team on Vercel. A member of the Team first needs to authorize it. |
Apply Sweep Rules to your PR?
|
const errors = validationResult(req); | ||
if (!errors.isEmpty()) { | ||
sendOutcome(res, invalidRequest(errors)); | ||
return; | ||
} | ||
|
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.
Not sure if this approach is viable given that the behavior is slightly different here in that request validation would now run prior to the config check
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.
It's ok 👍
Thanks @dillonstreator - this looks great. |
Thank you @codyebberson! |
e80ee14
to
5ec4927
Compare
rebased to include coveralls fix #3246 |
|
||
next(); | ||
} | ||
} |
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.
not in love with the filename
thoughts on utils/http.ts
or utils/middleware.ts
?
open to other suggestions or keeping if I'm being too nit-picky
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.
Re name: Sounds ok to me. I like validator.ts
better than http.ts
or middleware.ts
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.
Nice, thanks @dillonstreator !
|
||
next(); | ||
} | ||
} |
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.
Re name: Sounds ok to me. I like validator.ts
better than http.ts
or middleware.ts
const errors = validationResult(req); | ||
if (!errors.isEmpty()) { | ||
sendOutcome(res, invalidRequest(errors)); | ||
return; | ||
} | ||
|
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.
It's ok 👍
Refinements and additions fot Health Gorilla documentation as we proceed through testing (#3333) Tighter input validation on security endpoints (#3334) Use react-jsx transform (#3338) Create documentation for chained search (#3312) Document performing insurance eligibility checks (#3280) feat(expo): add `ExpoClientStorage` for persisted store in RN (#3307) test(server): add `test.config.json` with port `8104` (#3329) Make Postgres version configurable in CDK (#3327) Configure agent service name and automatic start (#3321) Link authentication methods to relevant Medplum Client functions (#3323) server centralize request validation for co-location and reduced redundancy (#3228) Fixed FHIR link (#3319)
Refinements and additions fot Health Gorilla documentation as we proceed through testing (#3333) Tighter input validation on security endpoints (#3334) Use react-jsx transform (#3338) Create documentation for chained search (#3312) Document performing insurance eligibility checks (#3280) feat(expo): add `ExpoClientStorage` for persisted store in RN (#3307) test(server): add `test.config.json` with port `8104` (#3329) Make Postgres version configurable in CDK (#3327) Configure agent service name and automatic start (#3321) Link authentication methods to relevant Medplum Client functions (#3323) server centralize request validation for co-location and reduced redundancy (#3228) Fixed FHIR link (#3319)
No description provided.