Diagnostic tool: testing API communication from Prosody to Peertube.

This commit is contained in:
John Livingston
2021-06-22 12:57:24 +02:00
parent 7279761c66
commit a526feac19
6 changed files with 83 additions and 7 deletions

View File

@ -34,6 +34,14 @@ async function initApiRouter (options: RegisterServerOptions): Promise<Router> {
const router = getRouter()
const logger = peertubeHelpers.logger
router.get('/test', asyncMiddleware([
getCheckAPIKeyMiddleware(options),
async (req: Request, res: Response, _next: NextFunction) => {
logger.info('Test api call')
res.json({ ok: true })
}
]))
router.get('/room', asyncMiddleware([
getCheckAPIKeyMiddleware(options),
async (req: Request, res: Response, _next: NextFunction) => {