Skip to content

Commit 641a461

Browse files
committed
chore: lint fix
1 parent d3cdb5c commit 641a461

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/runtime/server/api/_hub/cache/[...key].delete.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default eventHandler(async (event) => {
99
requireNuxtHubFeature('cache')
1010

1111
const key = getRouterParam(event, 'key') || ''
12-
if (!/\.([a-z0-9]+)$/i.test(key)) {
12+
if (!/\.[a-z0-9]+$/i.test(key)) {
1313
throw createError({
1414
statusCode: 400,
1515
message: 'Invalid key'

src/runtime/server/api/_hub/cache/[...key].get.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default eventHandler(async (event) => {
1111

1212
const key = getRouterParam(event, 'key') || ''
1313
// If ends with an extension
14-
if (/\.([a-z0-9]+)$/i.test(key)) {
14+
if (/\.[a-z0-9]+$/i.test(key)) {
1515
return await useStorage('cache:nitro').getItem(key)
1616
}
1717
const storage = useStorage(`cache:nitro:${key}`)

src/runtime/server/api/_hub/cache/clear/[...base].delete.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default eventHandler(async (event) => {
99
requireNuxtHubFeature('cache')
1010

1111
const base = getRouterParam(event, 'base') || ''
12-
if (/\.([a-z0-9]+)$/i.test(base)) {
12+
if (/\.[a-z0-9]+$/i.test(base)) {
1313
throw createError({
1414
statusCode: 400,
1515
message: 'Invalid base'

0 commit comments

Comments
 (0)