aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/index.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/api/index.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/api/index.ts')
-rw-r--r--server/controllers/api/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/controllers/api/index.ts b/server/controllers/api/index.ts
index eda9e04d1..7ade1df3a 100644
--- a/server/controllers/api/index.ts
+++ b/server/controllers/api/index.ts
@@ -1,6 +1,7 @@
1import * as cors from 'cors' 1import * as cors from 'cors'
2import * as express from 'express' 2import * as express from 'express'
3import * as RateLimit from 'express-rate-limit' 3import * as RateLimit from 'express-rate-limit'
4import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
4import { badRequest } from '../../helpers/express-utils' 5import { badRequest } from '../../helpers/express-utils'
5import { CONFIG } from '../../initializers/config' 6import { CONFIG } from '../../initializers/config'
6import { abuseRouter } from './abuse' 7import { abuseRouter } from './abuse'
@@ -56,5 +57,5 @@ export { apiRouter }
56// --------------------------------------------------------------------------- 57// ---------------------------------------------------------------------------
57 58
58function pong (req: express.Request, res: express.Response) { 59function pong (req: express.Request, res: express.Response) {
59 return res.send('pong').status(200).end() 60 return res.send('pong').status(HttpStatusCode.OK_200).end()
60} 61}