Skip to content

Commit

Permalink
Match the response style on the competing-interests question
Browse files Browse the repository at this point in the history
Refs #2173
  • Loading branch information
thewilkybarkid committed Jan 13, 2025
1 parent d39befd commit 5ee553d
Show file tree
Hide file tree
Showing 3 changed files with 364 additions and 456 deletions.
17 changes: 16 additions & 1 deletion src/app-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,22 @@ const router: P.Parser<RM.ReaderMiddleware<RouterEnv, StatusOpen, ResponseEnded,
),
pipe(
writeReviewCompetingInterestsMatch.parser,
P.map(({ id }) => writeReviewCompetingInterests(id)),
P.map(({ id }) =>
pipe(
RM.of({ id }),
RM.apS(
'body',
RM.gets(c => c.getBody()),
),
RM.apS(
'method',
RM.gets(c => c.getMethod()),
),
RM.apS('user', maybeGetUser),
RM.bindW('response', RM.fromReaderTaskK(writeReviewCompetingInterests)),
RM.ichainW(handleResponse),
),
),
),
pipe(
writeReviewConductMatch.parser,
Expand Down
Loading

0 comments on commit 5ee553d

Please sign in to comment.