Skip to content

Commit 414ae87

Browse files
committed
fix: add missing imports
1 parent be5ad68 commit 414ae87

9 files changed

+12
-0
lines changed

src/runtime/server/api/_hub/analytics/index.put.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import type { AnalyticsEngineDataPoint } from '@cloudflare/workers-types/experimental'
22
import { eventHandler, readValidatedBody } from 'h3'
3+
import { z } from 'zod'
4+
import { useAnalytics } from '../../../utils/analytics'
35

46
export default eventHandler(async (event) => {
57
const { data } = await readValidatedBody(event, z.object({

src/runtime/server/api/_hub/blob/[...pathname].delete.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { eventHandler, getValidatedRouterParams } from 'h3'
22
import { z } from 'zod'
3+
import { useBlob } from '../../../utils/blob'
34

45
export default eventHandler(async (event) => {
56
const { pathname } = await getValidatedRouterParams(event, z.object({

src/runtime/server/api/_hub/blob/[...pathname].get.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { eventHandler, getValidatedRouterParams } from 'h3'
22
import { z } from 'zod'
3+
import { useBlob } from '../../../utils/blob'
34

45
export default eventHandler(async (event) => {
56
// TODO: handle caching in production

src/runtime/server/api/_hub/blob/[...pathname].head.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { eventHandler, getValidatedRouterParams, setHeader, sendNoContent } from 'h3'
22
import { z } from 'zod'
3+
import { useBlob } from '../../../utils/blob'
34

45
export default eventHandler(async (event) => {
56
const { pathname } = await getValidatedRouterParams(event, z.object({

src/runtime/server/api/_hub/blob/[...pathname].put.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { eventHandler, getValidatedRouterParams, getHeader, getRequestWebStream } from 'h3'
22
import { z } from 'zod'
3+
import { useBlob } from '../../../utils/blob'
34

45
async function streamToArrayBuffer(stream: ReadableStream, streamSize: number) {
56
const result = new Uint8Array(streamSize)

src/runtime/server/api/_hub/blob/index.get.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { eventHandler } from 'h3'
2+
import { useBlob } from '../../../utils/blob'
23

34
export default eventHandler(async () => {
45
return useBlob().list()

src/runtime/server/api/_hub/database/[command].post.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { eventHandler, getValidatedRouterParams, readValidatedBody } from 'h3'
22
import { z } from 'zod'
3+
import { useDatabase } from '../../../utils/database'
34

45
const statementValidation = z.object({
56
query: z.string().min(1).max(1e6).trim(),

src/runtime/server/api/_hub/kv/[...path].ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { eventHandler } from 'h3'
22
import { createH3StorageHandler } from 'unstorage/server'
3+
import { useKV } from '../../../utils/kv'
34

45
export default eventHandler(async (event) => {
56
const storage = useKV()

src/runtime/server/api/_hub/primitives.get.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import { eventHandler } from 'h3'
2+
import { useDatabase } from '../../utils/database'
3+
import { useBlob } from '../../utils/blob'
4+
import { useKV } from '../../utils/kv'
25

36
export default eventHandler(async () => {
47
const [ dbCheck, kvCheck, blobCheck ] = await Promise.all([

0 commit comments

Comments
 (0)