Merge pull request #305 from ajayyy/userid-limit

Minimum userID size
This commit is contained in:
Ajay Ramachandran
2021-07-06 01:00:44 -04:00
committed by GitHub
5 changed files with 49 additions and 49 deletions

View File

@@ -340,7 +340,7 @@ export async function postSkipSegments(req: Request, res: Response): Promise<Res
if (typeof videoID !== 'string') {
invalidFields.push('videoID');
}
if (typeof userID !== 'string') {
if (typeof userID !== 'string' || userID.length < 30) {
invalidFields.push('userID');
}
if (!Array.isArray(segments) || segments.length < 1) {