1 import * as cors from 'cors'
2 import * as express from 'express'
3 import { mapToJSON } from '@server/helpers/core-utils'
4 import { LiveManager } from '@server/lib/live-manager'
6 const liveRouter = express.Router()
8 liveRouter.use('/segments-sha256/:videoUUID',
13 // ---------------------------------------------------------------------------
19 // ---------------------------------------------------------------------------
21 function getSegmentsSha256 (req: express.Request, res: express.Response) {
22 const videoUUID = req.params.videoUUID
24 const result = LiveManager.Instance.getSegmentsSha256(videoUUID)
27 return res.sendStatus(404)
30 return res.json(mapToJSON(result))