aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos/watching.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/videos/watching.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/videos/watching.ts')
-rw-r--r--server/controllers/api/videos/watching.ts5
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'
2import { UserWatchingVideo } from '../../../../shared' 2import { UserWatchingVideo } from '../../../../shared'
3import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares' 3import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares'
4import { UserVideoHistoryModel } from '../../../models/account/user-video-history' 4import { UserVideoHistoryModel } from '../../../models/account/user-video-history'
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
5 6
6const watchingRouter = express.Router() 7const 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}