0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Update ID validation check

This commit is contained in:
G.Ambatte
2025-07-10 20:58:46 +12:00
parent 1794e96d50
commit abef250631

View File

@@ -50,7 +50,7 @@ const api = {
}
// ID Validation Checks
if(!id.match(/^[A-Za-z0-9_-]{7,12}$/)){
if(!id.match(/^[A-Za-z0-9_-]{7,14}$/)){
throw { name: 'ID Error', message: 'Invalid ID', status: 404, HBErrorCode: '11', brewId: id };
}
if(googleId && !googleId.match(/^1(?:[A-Za-z0-9+\/]{32}|[A-Za-z0-9+\/]{43})$/)){