-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[keyserver] Move validators to endpoint array
Summary: (ENG-3879)[https://linear.app/comm/issue/ENG-3879/move-output-and-input-validators-outside-of-the-responders] Followup to the id schema work. Moving all the validation to the endpoint array makes it less likely for the devs to forgot to add it (which already happened a few times). Additionaly it moves the validation logic outside of the responder and now they are fully focused on the business logic. An additional change that needed to be made was exporting the input validators, so they could be imported in the `endpoints.js`. I choose to not split it into multiple diffs, because I'm doing the same thing everywhere, but if it's hard to review I can split into more diffs. Test Plan: - run `yarn flow-all` (note: for some reason flow allows wrong output responders, even they are correctly typed with generics) - play around the app and check if everything works correctly (in particular I tested log in, register and siwe flows) Reviewers: kamil, tomek Reviewed By: tomek Subscribers: ashoat Differential Revision: https://phab.comm.dev/D8661
- Loading branch information
1 parent
f5fdef7
commit 7492050
Showing
22 changed files
with
961 additions
and
1,156 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.