Add a minimum size to userID when submitting

This commit is contained in:
Ajay Ramachandran
2021-07-06 00:49:07 -04:00
parent 35e1cf5733
commit 2379899f02
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) {