Skip to content

Commit

Permalink
update reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
benStre committed Nov 30, 2023
1 parent 9d47b86 commit 065a064
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions network/datex-http-channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export function sendDatexViaHTTPChannel(dxb: ArrayBuffer, origin = window.locati
}
else {
fetch(origin + "/datex-http", {
method:'post',
headers:{
method: 'post',
headers: {
'Content-Type': 'application/datex',
},
body: dxb,
Expand Down
8 changes: 4 additions & 4 deletions utils/error-reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import { Runtime } from "../runtime/runtime.ts";
import { getCallerInfo } from "../utils/caller_metadata.ts";
import { logger } from "./global_values.ts";

export async function sendReport(id: string, reportData:Record<string,any>) {
export async function sendReport(identifier: string, reportData:Record<string,any>) {
if (!enabled) return;

const report = {
id,
identifier,
timestamp: new Date(),
metaData: {
metadata: {
datexcoreVersion: Runtime.VERSION,
uixVersion: globalThis.UIX?.version,
denoVersion: globalThis.Deno?.version.deno,
Expand All @@ -22,7 +22,7 @@ export async function sendReport(id: string, reportData:Record<string,any>) {
stack: getCallerInfo()
}

const dx = `@+unyt_status.Reporting.sendReport(?)`
const dx = `#endpoint.Reporting.sendReport(?)`
const dxb = <ArrayBuffer> await Compiler.compile(dx, [report], {sign: false, encrypt: false});
sendDatexViaHTTPChannel(dxb, "https://status.unyt.org")
}
Expand Down

0 comments on commit 065a064

Please sign in to comment.