22 lines
928 B
JavaScript
22 lines
928 B
JavaScript
|
// define routes using prepacakged middleware collections
|
||
|
module.exports = (app, apex, routes) => {
|
||
|
app.route(routes.inbox)
|
||
|
.get(apex.net.inbox.get)
|
||
|
.post(apex.net.inbox.post)
|
||
|
app.route(routes.outbox)
|
||
|
.get(apex.net.outbox.get)
|
||
|
.post(apex.net.outbox.post)
|
||
|
app.get(routes.actor, apex.net.actor.get)
|
||
|
app.get(routes.followers, apex.net.followers.get)
|
||
|
app.get(routes.following, apex.net.following.get)
|
||
|
app.get(routes.liked, apex.net.liked.get)
|
||
|
app.get(routes.object, apex.net.object.get)
|
||
|
app.get(routes.activity, apex.net.activityStream.get)
|
||
|
app.get(routes.shares, apex.net.shares.get)
|
||
|
app.get(routes.likes, apex.net.likes.get)
|
||
|
app.get('/.well-known/webfinger', apex.net.webfinger.get)
|
||
|
app.get('/.well-known/nodeinfo', apex.net.nodeInfoLocation.get)
|
||
|
app.get('/nodeinfo/:version', apex.net.nodeInfo.get)
|
||
|
app.post('/proxy', apex.net.proxy.post)
|
||
|
}
|