diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-12-07 14:32:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 14:32:36 +0100 |
commit | 2d53be0267acc49cda46707b885096193a1f4e9c (patch) | |
tree | 887061a34bc67f40acbb96a6278f9544bf83caeb /server/controllers/api/index.ts | |
parent | adc1f09c0dbd997f34028c1c82d1c118dc8ead80 (diff) | |
download | PeerTube-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.ts | 3 |
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 @@ | |||
1 | import * as cors from 'cors' | 1 | import * as cors from 'cors' |
2 | import * as express from 'express' | 2 | import * as express from 'express' |
3 | import * as RateLimit from 'express-rate-limit' | 3 | import * as RateLimit from 'express-rate-limit' |
4 | import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes' | ||
4 | import { badRequest } from '../../helpers/express-utils' | 5 | import { badRequest } from '../../helpers/express-utils' |
5 | import { CONFIG } from '../../initializers/config' | 6 | import { CONFIG } from '../../initializers/config' |
6 | import { abuseRouter } from './abuse' | 7 | import { abuseRouter } from './abuse' |
@@ -56,5 +57,5 @@ export { apiRouter } | |||
56 | // --------------------------------------------------------------------------- | 57 | // --------------------------------------------------------------------------- |
57 | 58 | ||
58 | function pong (req: express.Request, res: express.Response) { | 59 | function 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 | } |