add check for bio

This commit is contained in:
Face 2025-05-30 16:50:56 +03:00
parent 9307319693
commit e167dd79d7

View file

@ -28,6 +28,10 @@ async function validateInputs(name: string, bio: string, username: string, avata
throw error(400, 'Username contains inappropriate content');
}
if (bio && !(await isNameAppropriate(bio))) {
throw error(400, 'Bio contains inappropriate content');
}
if (avatarFile && avatarFile.size > MAX_FILE_SIZE) {
throw error(400, 'Avatar file must be smaller than 1MB');
}