Skip to content

Instantly share code, notes, and snippets.

@JozefFlakus
Last active February 28, 2019 18:36
Show Gist options
  • Select an option

  • Save JozefFlakus/eeb8ca2d12c7d1120ea8cc9e61c6926a to your computer and use it in GitHub Desktop.

Select an option

Save JozefFlakus/eeb8ca2d12c7d1120ea8cc9e61c6926a to your computer and use it in GitHub Desktop.
import { use, r } from '@marblejs/core';
const postUser$ = r.pipe(
r.matchPath('/'),
r.matchType('POST'),
r.use(authorize$),
r.useEffect(req$ => req$.pipe(
use(postUserValidator$),
map(req => req.body),
mergeMap(createUser),
map(body => ({ body })),
)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment