clone data for demo/dev env

This commit is contained in:
2026-07-05 18:54:33 +05:00
parent 5b97022116
commit 3c94cd92c1
2 changed files with 16 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
export const cloudIngestUrl = process.env.CLOUD_INGEST_URL as string
export const demoCloudIngestUrl = process.env.DEMO_CLOUD_INGEST_URL as string
export function postCloudIngest(body: unknown): Promise<Response> {
return fetch(cloudIngestUrl, {
@@ -10,3 +11,14 @@ export function postCloudIngest(body: unknown): Promise<Response> {
body: JSON.stringify(body),
})
}
export function postDemoCloudIngest(body: unknown): Promise<Response> {
return fetch(demoCloudIngestUrl, {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': process.env.CLOUD_INGEST_API_KEY as string,
},
body: JSON.stringify(body),
})
}