mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2026-02-06 09:55:50 +00:00
30 lines
679 B
JavaScript
30 lines
679 B
JavaScript
import user from './user'
|
|
import inbox from './inbox'
|
|
import express from 'express'
|
|
import cors from 'cors'
|
|
import verify from './verify'
|
|
|
|
export default function () {
|
|
const router = express.Router()
|
|
router.use(
|
|
'/activitypub/users',
|
|
cors(),
|
|
express.json({
|
|
type: ['application/activity+json', 'application/ld+json', 'application/json'],
|
|
}),
|
|
express.urlencoded({ extended: true }),
|
|
user,
|
|
)
|
|
router.use(
|
|
'/activitypub/inbox',
|
|
cors(),
|
|
express.json({
|
|
type: ['application/activity+json', 'application/ld+json', 'application/json'],
|
|
}),
|
|
express.urlencoded({ extended: true }),
|
|
verify,
|
|
inbox,
|
|
)
|
|
return router
|
|
}
|