api/service-patterns: fix reddit id pattern

This commit is contained in:
wukko 2025-02-10 00:06:03 +06:00
parent ed8e234e3b
commit 06a28dd347
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2

View File

@ -20,7 +20,7 @@ export const testers = {
pattern.id?.length <= 128 || pattern.shortLink?.length <= 32,
"reddit": pattern =>
pattern.id?.length <= 16
pattern.id?.length <= 16 && !pattern.sub && !pattern.user
|| (pattern.sub?.length <= 22 && pattern.id?.length <= 16)
|| (pattern.user?.length <= 22 && pattern.id?.length <= 16)
|| (pattern.sub?.length <= 22 && pattern.shareId?.length <= 16),