Skip to content

Commit 5a5e223

Browse files
committed
fix: update Tripo3D API to use providerPath for passthrough routing
- Change getEndpoint to use providerPath instead of hardcoded fn cases - Fixes TypeScript errors after removing endpoint strings from types
1 parent 3de4523 commit 5a5e223

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

src/providers/tripo3d/api.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,9 @@ const Tripo3DAPIConfig: ProviderAPIConfig = {
55
headers: ({ providerOptions }) => {
66
return { Authorization: `Bearer ${providerOptions.apiKey}` };
77
},
8-
getEndpoint: ({ fn }) => {
9-
switch (fn) {
10-
case 'createTask':
11-
return '/task';
12-
case 'getTask':
13-
return '/task';
14-
case 'uploadFile':
15-
return '/upload';
16-
case 'getStsToken':
17-
return '/upload/sts/token';
18-
case 'getBalance':
19-
return '/user/balance';
20-
default:
21-
return '';
22-
}
8+
getEndpoint: ({ providerPath }) => {
9+
// For passthrough proxy, use the path directly
10+
return providerPath || '';
2311
},
2412
};
2513

0 commit comments

Comments
 (0)