X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Flive.ts;h=81008f120d213cdb5b9975b9c3958d0e4e2a2ea4;hb=4e56f0fff12ab9840574e7a27277fc78b195b3e2;hp=5feadae72ae5953b08ce3f5a3fcffb1ca69248b5;hpb=4a7f90248b546803cab07188521ac97e175b31e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/live.ts b/server/controllers/live.ts index 5feadae72..81008f120 100644 --- a/server/controllers/live.ts +++ b/server/controllers/live.ts @@ -1,7 +1,8 @@ -import * as cors from 'cors' -import * as express from 'express' +import cors from 'cors' +import express from 'express' import { mapToJSON } from '@server/helpers/core-utils' -import { LiveManager } from '@server/lib/live-manager' +import { LiveSegmentShaStore } from '@server/lib/live' +import { HttpStatusCode } from '@shared/models' const liveRouter = express.Router() @@ -21,10 +22,10 @@ export { function getSegmentsSha256 (req: express.Request, res: express.Response) { const videoUUID = req.params.videoUUID - const result = LiveManager.Instance.getSegmentsSha256(videoUUID) + const result = LiveSegmentShaStore.Instance.getSegmentsSha256(videoUUID) if (!result) { - return res.sendStatus(404) + return res.status(HttpStatusCode.NOT_FOUND_404).end() } return res.json(mapToJSON(result))