import { omit } from 'lodash'
import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc'
import {
- isNoInstanceConfigWarningModal, isNoWelcomeModal,
+ isNoInstanceConfigWarningModal,
+ isNoWelcomeModal,
isUserAdminFlagsValid,
+ isUserAutoPlayNextVideoValid,
isUserAutoPlayVideoValid,
isUserBlockedReasonValid,
isUserDescriptionValid,
body('noWelcomeModal')
.optional()
.custom(v => isNoWelcomeModal(v)).withMessage('Should have a valid noWelcomeModal boolean'),
+ body('autoPlayNextVideo')
+ .optional()
+ .custom(v => isUserAutoPlayNextVideoValid(v)).withMessage('Should have a valid autoPlayNextVideo boolean'),
async (req: express.Request, res: express.Response, next: express.NextFunction) => {
logger.debug('Checking usersUpdateMe parameters', { parameters: omit(req.body, 'password') })
await wait(7000)
- for (let i = 0; i < 50; i++) {
- await getVideo(server.url, videoId)
+ for (let i = 0; i < 100; i++) {
+ try {
+ await getVideo(server.url, videoId)
+ } catch {
+ // don't care if it fails
+ }
}
await getVideo(server.url, videoId, 429)