Skip to content

Commit fedbcd7

Browse files
fix: remove unused import and replace dynamic imports with static imports (#2184)
* fix: remove unused Context import from listen.ts Co-Authored-By: yujonglee <[email protected]> * refactor: replace dynamic imports with static imports in routes/stt.ts Co-Authored-By: yujonglee <[email protected]> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: yujonglee <[email protected]>
1 parent 5e48fd0 commit fedbcd7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

apps/api/src/listen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Context, Handler } from "hono";
1+
import type { Handler } from "hono";
22
import { upgradeWebSocket } from "hono/bun";
33

44
import type { AppBindings } from "./hono-bindings";

apps/api/src/routes/stt.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { resolver } from "hono-openapi/zod";
44
import { z } from "zod";
55

66
import type { AppBindings } from "../hono-bindings";
7+
import { listenSocketHandler } from "../listen";
8+
import { transcribeBatch } from "../stt";
79
import { API_TAGS } from "./constants";
810

911
const WebSocketErrorSchema = z.object({
@@ -92,8 +94,7 @@ stt.get(
9294
},
9395
},
9496
}),
95-
async (c, next) => {
96-
const { listenSocketHandler } = await import("../listen");
97+
(c, next) => {
9798
return listenSocketHandler(c, next);
9899
},
99100
);
@@ -150,7 +151,6 @@ stt.post(
150151
},
151152
}),
152153
async (c) => {
153-
const { transcribeBatch } = await import("../stt");
154154
type BatchProvider = "deepgram" | "assemblyai" | "soniox";
155155

156156
const emit = c.get("emit");

0 commit comments

Comments
 (0)