Add new icon in WEBP format to public directory

This commit is contained in:
ngthanhvu
2026-07-30 23:01:25 -04:00
parent 63ef322ccf
commit e5d634f611
105 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ export default defineEventHandler(async (event) => {
}
const parts = avatar.split('/')
const num = parts[2]?.replace('.jpg', '')
const num = parts[2]?.replace(/\.(?:jpg|webp)$/, '')
if (parts.length !== 3 || parts[0] !== 'avatars' || !validCategories.includes(parts[1]) || !validNumbers[parts[1]]?.includes(num)) {
throw createError({ statusCode: 400, message: 'Avatar không hợp lệ' })
}