]>
Commit | Line | Data |
---|---|---|
fae6e4da | 1 | import { InboxManager } from '@server/lib/activitypub/inbox-manager' |
5d79474c C |
2 | import * as express from 'express' |
3 | import { UserRight } from '../../../../shared/models/users' | |
a1587156 | 4 | import { authenticate, ensureUserHasRight } from '../../../middlewares' |
5d79474c C |
5 | |
6 | const debugRouter = express.Router() | |
7 | ||
8 | debugRouter.get('/debug', | |
9 | authenticate, | |
10 | ensureUserHasRight(UserRight.MANAGE_DEBUG), | |
a1587156 | 11 | getDebug |
5d79474c C |
12 | ) |
13 | ||
14 | // --------------------------------------------------------------------------- | |
15 | ||
16 | export { | |
17 | debugRouter | |
18 | } | |
19 | ||
20 | // --------------------------------------------------------------------------- | |
21 | ||
a1587156 | 22 | function getDebug (req: express.Request, res: express.Response) { |
5d79474c | 23 | return res.json({ |
fae6e4da C |
24 | ip: req.ip, |
25 | activityPubMessagesWaiting: InboxManager.Instance.getActivityPubMessagesWaiting() | |
26 | }) | |
5d79474c | 27 | } |