mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
add video upload types, add doc middleware to more routes
This commit is contained in:
parent
fc21ef5c62
commit
c756bae079
6 changed files with 88 additions and 21 deletions
|
@ -1,12 +1,19 @@
|
|||
import * as express from 'express'
|
||||
import { UserWatchingVideo } from '../../../../shared'
|
||||
import { asyncMiddleware, asyncRetryTransactionMiddleware, authenticate, videoWatchingValidator } from '../../../middlewares'
|
||||
import {
|
||||
asyncMiddleware,
|
||||
asyncRetryTransactionMiddleware,
|
||||
authenticate,
|
||||
openapiOperationDoc,
|
||||
videoWatchingValidator
|
||||
} from '../../../middlewares'
|
||||
import { UserVideoHistoryModel } from '../../../models/user/user-video-history'
|
||||
import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
|
||||
|
||||
const watchingRouter = express.Router()
|
||||
|
||||
watchingRouter.put('/:videoId/watching',
|
||||
openapiOperationDoc({ operationId: 'setProgress' }),
|
||||
authenticate,
|
||||
asyncMiddleware(videoWatchingValidator),
|
||||
asyncRetryTransactionMiddleware(userWatchVideo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue