mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 11:31:27 +00:00
call api host method
This commit is contained in:
1 parent
52fb116f3a
commit
6c10357557
3 files changed
+11
-1
No files matched your search
@@ -1,3 +1,5 @@
|
||||
import { StorytellerApiHostStore } from "@storyteller/api";
|
||||
|
||||
export type SubmitVFXJobRequest = {
|
||||
source_video_media_token: string;
|
||||
reference_image_media_token: string | null;
|
||||
@@ -22,7 +24,9 @@ export async function submitVFXJob(
|
||||
req: SubmitVFXJobRequest,
|
||||
): Promise<SubmitVFXJobResponse> {
|
||||
try {
|
||||
const res = await fetch(VFX_ENDPOINT, {
|
||||
const url = StorytellerApiHostStore.getInstance().pathToFullUrl(VFX_ENDPOINT);
|
||||
|
||||
const res = await fetch(url, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
credentials: "include",
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
"files": [],
|
||||
"include": [],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../api"
|
||||
},
|
||||
{
|
||||
"path": "../../common"
|
||||
},
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
"src/**/*.tsx"
|
||||
],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../api/tsconfig.lib.json"
|
||||
},
|
||||
{
|
||||
"path": "../../common/tsconfig.lib.json"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user