Skip to content

Commit 3261af4

Browse files
fix: remove test code
1 parent 0043eef commit 3261af4

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

definitions/vite-supadata-runner/worker/userRoutes.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,10 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
3636
app.post('/api/supadata/transcript', async (c) => {
3737
let apiKey = ''
3838
let e = {} as any
39-
const cookie = c.req.header('Cookie')
40-
try {
41-
// GET API KEY BY THIS METHOD. DO NOT GET API KEY FROM ENV.
42-
apiKey = await getUserAPIKey(c);
43-
} catch(e: any) {
44-
return c.json({
45-
success: false,
46-
cookie,
47-
error: e.message
48-
}, { status: 501 });
49-
}
5039
try {
5140
e = await c.req.json();
5241

53-
42+
apiKey = await getUserAPIKey(c);
5443
// Initialize the client
5544
const supadata = new Supadata({
5645
apiKey,

0 commit comments

Comments
 (0)