diff --git a/web/collector/CollectorClient.ts b/web/collector/CollectorClient.ts --- a/web/collector/CollectorClient.ts +++ b/web/collector/CollectorClient.ts @@ -1,4 +1,6 @@ -type Settings = Array<[string,string,string|number]>; +import { Literal, NamedNode } from "n3"; + +type Settings = Array<[NamedNode,NamedNode,Literal]>; export class CollectorClient { private settings: Settings; @@ -13,13 +15,14 @@ export class CollectorClient { }, 1000); } private async put() { + // todo: WS await fetch("/service/collector/attrs", { method: "PUT", body: JSON.stringify({ client: this.clientName, clientSession: "unused", sendTime: Date.now() / 1000, - settings: this.settings, + settings: this.settings.map(([d,da,v]) => [d.value,da.value,v.value]) }), }); }