From 14859451567a019a723d0fbd2910a8334b04f7c6 Mon Sep 17 00:00:00 2001 From: Xiao Gui Date: Mon, 1 Apr 2024 19:24:53 +1100 Subject: [PATCH] fix ebrains publish --- frontend/src/views/shareExport/shareExport.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frontend/src/views/shareExport/shareExport.component.ts b/frontend/src/views/shareExport/shareExport.component.ts index 1a5255bf..f38e008e 100644 --- a/frontend/src/views/shareExport/shareExport.component.ts +++ b/frontend/src/views/shareExport/shareExport.component.ts @@ -7,6 +7,7 @@ import * as outputs from "src/state/outputs" import * as appState from "src/state/app" import * as generalActions from "src/state/actions" import { DestroyDirective } from "src/util/destroy.directive"; +import { ExportJson } from "src/state/outputs/consts"; const flattenMat = (arr: number[][]) => arr.reduce((acc, curr) => acc.concat(curr), []) @@ -300,13 +301,12 @@ export class ShareExportComponent { sending: true }) try{ + const { coordinateSpace, ...rest } = JSON.parse(content) as ExportJson const res = await fetch(`ebrains`, { method: "POST", body: JSON.stringify({ - body: { - ...JSON.parse(content), - description - } + ...rest, + description }), headers: { "content-type": "applicaton/json"