From 36a8e6677b287216899e0d2d9b487d64057abbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 5 Jun 2024 17:57:10 +0200 Subject: [PATCH] fix: missing imports for blob & multipart --- src/runtime/server/api/_hub/blob/delete-folder.post.ts | 2 +- .../server/api/_hub/blob/multipart/[...pathname].post.ts | 2 +- src/runtime/server/api/_hub/blob/multipart/complete.post.ts | 2 +- src/runtime/server/utils/blob.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/runtime/server/api/_hub/blob/delete-folder.post.ts b/src/runtime/server/api/_hub/blob/delete-folder.post.ts index 027ecca4..69fec834 100644 --- a/src/runtime/server/api/_hub/blob/delete-folder.post.ts +++ b/src/runtime/server/api/_hub/blob/delete-folder.post.ts @@ -1,4 +1,4 @@ -import { eventHandler } from 'h3' +import { eventHandler, readValidatedBody } from 'h3' import { z } from 'zod' import { hubBlob } from '../../../utils/blob' import { requireNuxtHubAuthorization } from '../../../utils/auth' diff --git a/src/runtime/server/api/_hub/blob/multipart/[...pathname].post.ts b/src/runtime/server/api/_hub/blob/multipart/[...pathname].post.ts index 401ac226..1d75c6d3 100644 --- a/src/runtime/server/api/_hub/blob/multipart/[...pathname].post.ts +++ b/src/runtime/server/api/_hub/blob/multipart/[...pathname].post.ts @@ -1,4 +1,4 @@ -import { createError, eventHandler } from 'h3' +import { createError, eventHandler, getValidatedRouterParams, readValidatedBody } from 'h3' import { z } from 'zod' import { hubBlob } from '../../../../utils/blob' import { requireNuxtHubAuthorization } from '../../../../utils/auth' diff --git a/src/runtime/server/api/_hub/blob/multipart/complete.post.ts b/src/runtime/server/api/_hub/blob/multipart/complete.post.ts index a73f99f3..067ad6fa 100644 --- a/src/runtime/server/api/_hub/blob/multipart/complete.post.ts +++ b/src/runtime/server/api/_hub/blob/multipart/complete.post.ts @@ -1,4 +1,4 @@ -import { createError, eventHandler, getValidatedQuery } from 'h3' +import { createError, eventHandler, getValidatedQuery, readValidatedBody } from 'h3' import { z } from 'zod' import { hubBlob } from '../../../../utils/blob' import { requireNuxtHubAuthorization } from '../../../../utils/auth' diff --git a/src/runtime/server/utils/blob.ts b/src/runtime/server/utils/blob.ts index 14e94541..7d676adf 100644 --- a/src/runtime/server/utils/blob.ts +++ b/src/runtime/server/utils/blob.ts @@ -4,7 +4,7 @@ import type { R2Bucket, ReadableStream, R2MultipartUpload } from '@cloudflare/wo import { ofetch } from 'ofetch' import mime from 'mime' import type { H3Event } from 'h3' -import { setHeader, createError, readFormData } from 'h3' +import { setHeader, createError, readFormData, getValidatedQuery, getValidatedRouterParams, readValidatedBody } from 'h3' import { defu } from 'defu' import { randomUUID } from 'uncrypto' import { parse } from 'pathe'