Files
mqtt-ingest/app/src/cloud-ingest.ts
2026-06-19 09:41:16 +03:00

13 lines
357 B
TypeScript

export const cloudIngestUrl = process.env.CLOUD_INGEST_URL as string
export function postCloudIngest(body: unknown): Promise<Response> {
return fetch(cloudIngestUrl, {
method: 'POST',
headers: {
'content-type': 'application/json',
'x-api-key': process.env.CLOUD_INGEST_API_KEY as string,
},
body: JSON.stringify(body),
})
}