Skip to content

Commit b129a84

Browse files
fix: error
1 parent 3261af4 commit b129a84

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
5252
mode: 'auto', // optional: 'native', 'auto', or 'generate'
5353
});
5454

55-
return transcriptResult
55+
return c.json({ success: true, data: transcriptResult });
5656
} catch (error: any) {
5757
console.error('Supdata routing error:', error);
5858
return c.json({
@@ -81,7 +81,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
8181
url: e.url,
8282
});
8383

84-
return transcriptResult
84+
return c.json({ success: true, data: transcriptResult });
8585
} catch (error: any) {
8686
console.error('Supdata routing error:', error);
8787
return c.json({
@@ -111,7 +111,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
111111
lang: 'es',
112112
});
113113

114-
return translated
114+
return c.json({ success: true, data: translated });
115115
} catch (error: any) {
116116
console.error('Supdata routing error:', error);
117117
return c.json({
@@ -140,7 +140,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
140140
id: e.videoId,
141141
});
142142

143-
return res
143+
return c.json({ success: true, data: res });
144144
} catch (error: any) {
145145
console.error('Supdata routing error:', error);
146146
return c.json({
@@ -169,7 +169,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
169169
id: e.videoId,
170170
});
171171

172-
return res
172+
return c.json({ success: true, data: res });
173173
} catch (error: any) {
174174
console.error('Supdata routing error:', error);
175175
return c.json({
@@ -200,7 +200,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
200200
limit: e.limit || 10,
201201
});
202202

203-
return res
203+
return c.json({ success: true, data: res });
204204
} catch (error: any) {
205205
console.error('Supdata routing error:', error);
206206
return c.json({
@@ -229,7 +229,7 @@ export function userRoutes(app: Hono<{ Bindings: any }>) {
229229
id: e.videoId, // can be url or playlist id
230230
});
231231

232-
return res
232+
return c.json({ success: true, data: res });
233233
} catch (error: any) {
234234
console.error('Supdata routing error:', error);
235235
return c.json({

0 commit comments

Comments
 (0)