Files: a6940a3d687c1a19beaf95c047f36bf32fbb8f2e / router / sync / routes.js
450 bytesRaw
1 | const nest = require('depnest') |
2 | |
3 | exports.gives = nest('router.sync.routes') |
4 | |
5 | exports.needs = nest({ |
6 | 'post.page.inbox': 'first' |
7 | }) |
8 | |
9 | exports.create = (api) => { |
10 | return nest('router.sync.routes', (sofar = []) => { |
11 | const pages = api.post.page |
12 | |
13 | // loc = location |
14 | const routes = [ |
15 | [ loc => loc.page === 'inbox', pages.inbox ], |
16 | // [ loc => loc.page === 'private', pages.private ], |
17 | ] |
18 | |
19 | return [...routes, ...sofar] |
20 | }) |
21 | } |
22 | |
23 |
Built with git-ssb-web