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/videos/watching.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/videos/watching.ts')
-rw-r--r-- | server/controllers/api/videos/watching.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/controllers/api/videos/watching.ts b/server/controllers/api/videos/watching.ts index 036e16f3a..627f12aa9 100644 --- a/server/controllers/api/videos/watching.ts +++ b/server/controllers/api/videos/watching.ts | |||
@@ -2,6 +2,7 @@ import * as express from 'express' | |||
2 | import { UserWatchingVideo } from '../../../../shared' | 2 | import { UserWatchingVideo } from '../../../../shared' |
3 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' | 3 | import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' |
4 | import { UserVideoHistoryModel } from '../../../models/account/user-video-history' | 4 | import { UserVideoHistoryModel } from '../../../models/account/user-video-history' |
5 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
5 | 6 | ||
6 | const watchingRouter = express.Router() | 7 | const watchingRouter = express.Router() |
7 | 8 | ||
@@ -31,5 +32,7 @@ async function userWatchVideo (req: express.Request, res: express.Response) { | |||
31 | currentTime: body.currentTime | 32 | currentTime: body.currentTime |
32 | }) | 33 | }) |
33 | 34 | ||
34 | return res.type('json').status(204).end() | 35 | return res.type('json') |
36 | .status(HttpStatusCode.NO_CONTENT_204) | ||
37 | .end() | ||
35 | } | 38 | } |