aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/live.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-07 14:32:36 +0100
committerGitHub <noreply@github.com>2020-12-07 14:32:36 +0100
commit2d53be0267acc49cda46707b885096193a1f4e9c (patch)
tree887061a34bc67f40acbb96a6278f9544bf83caeb /server/controllers/live.ts
parentadc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff)
downloadPeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.gz
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.tar.zst
PeerTube-2d53be0267acc49cda46707b885096193a1f4e9c.zip
replace numbers with typed http status codes (#3409)
Diffstat (limited to 'server/controllers/live.ts')
-rw-r--r--server/controllers/live.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/live.ts b/server/controllers/live.ts
index 5feadae72..ff48b0e21 100644
--- a/server/controllers/live.ts
+++ b/server/controllers/live.ts
@@ -2,6 +2,7 @@ import * as cors from 'cors'
2import * as express from 'express' 2import * as express from 'express'
3import { mapToJSON } from '@server/helpers/core-utils' 3import { mapToJSON } from '@server/helpers/core-utils'
4import { LiveManager } from '@server/lib/live-manager' 4import { LiveManager } from '@server/lib/live-manager'
5import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
5 6
6const liveRouter = express.Router() 7const liveRouter = express.Router()
7 8
@@ -24,7 +25,7 @@ function getSegmentsSha256 (req: express.Request, res: express.Response) {
24 const result = LiveManager.Instance.getSegmentsSha256(videoUUID) 25 const result = LiveManager.Instance.getSegmentsSha256(videoUUID)
25 26
26 if (!result) { 27 if (!result) {
27 return res.sendStatus(404) 28 return res.sendStatus(HttpStatusCode.NOT_FOUND_404)
28 } 29 }
29 30
30 return res.json(mapToJSON(result)) 31 return res.json(mapToJSON(result))