1
0
mirror of https://framagit.org/framasoft/peertube/search-index/ synced 2025-01-10 08:32:41 +01:00
sepia-search-motore-di-rice.../server/controllers/api/index.ts
2022-06-03 10:54:30 +02:00

26 lines
832 B
TypeScript

import express from 'express'
import { badRequest } from '../../helpers/utils'
import { configRouter } from './config'
import { searchChannelsRouter } from './search-channels'
import { searchPlaylistsRouter } from './search-playlists'
import { searchVideosRouter } from './search-videos'
const apiRouter = express.Router()
apiRouter.use('/', configRouter)
apiRouter.use('/', searchVideosRouter)
apiRouter.use('/', searchChannelsRouter)
apiRouter.use('/', searchPlaylistsRouter)
apiRouter.use('/ping', pong)
apiRouter.use('/*', badRequest)
// ---------------------------------------------------------------------------
export { apiRouter }
// ---------------------------------------------------------------------------
function pong (req: express.Request, res: express.Response) {
return res.send('pong').status(200).end()
}