mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-08 11:01:35 +00:00
try call without include credentials
This commit is contained in:
1 parent
94012e90f6
commit
925e488a56
1 file changed
+1
-36
@@ -24,7 +24,7 @@ export async function GenerateTtsAudio(request: GenerateTtsAudioRequest) : Promi
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
credentials: 'include',
|
||||
// credentials: 'include',
|
||||
body: JSON.stringify(request),
|
||||
})
|
||||
.then(res => res.json())
|
||||
@@ -47,39 +47,4 @@ export async function GenerateTtsAudio(request: GenerateTtsAudioRequest) : Promi
|
||||
return { error: GenerateTtsAudioErrorType.UnknownError };
|
||||
});
|
||||
|
||||
// return await fetch(inferTts, {
|
||||
// method: 'POST',
|
||||
// headers: {
|
||||
// 'Accept': 'application/json',
|
||||
// 'Content-Type': 'application/json',
|
||||
// },
|
||||
// credentials: 'include',
|
||||
// body: JSON.stringify(request),
|
||||
// })
|
||||
// .then(res => res.json().then(data => ({ status: <number>res.status, body: <EndpointResponse>data })))
|
||||
// .then((fullResponse) => {
|
||||
// let maybeError = maybeMapError(fullResponse);
|
||||
// if (maybeError !== undefined) {
|
||||
// return { error: maybeError };
|
||||
// }
|
||||
// if (!fullResponse.body || !fullResponse.body.success) {
|
||||
// return { error: GenerateTtsAudioErrorType.UnknownError };
|
||||
// }
|
||||
|
||||
// if (!('inference_job_token' in fullResponse.body)) {
|
||||
// return { error: GenerateTtsAudioErrorType.UnknownError };
|
||||
// } else {
|
||||
// return <GenerateTtsAudioSuccess> {
|
||||
// inference_job_token: fullResponse.body.inference_job_token,
|
||||
// inference_job_token_type: fullResponse.body.inference_job_token_type,
|
||||
// };
|
||||
// }
|
||||
// })
|
||||
// .catch(e => {
|
||||
// let maybeError = maybeMapError(e);
|
||||
// if (maybeError !== undefined) {
|
||||
// return { error: maybeError };
|
||||
// }
|
||||
// return { error: GenerateTtsAudioErrorType.UnknownError };
|
||||
// });
|
||||
};
|
||||
Reference in new issue
Block a user