From 37a5be906c22a7a0ab205f50be600ad85f00e80d Mon Sep 17 00:00:00 2001 From: Ernst Widerberg Date: Wed, 24 Nov 2021 17:11:02 +0100 Subject: Update for backend changes --- src/components/ObjectView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/ObjectView.js') diff --git a/src/components/ObjectView.js b/src/components/ObjectView.js index 3b39c96..cecadeb 100644 --- a/src/components/ObjectView.js +++ b/src/components/ObjectView.js @@ -19,7 +19,7 @@ class ObjectView extends React.Component { getData() { fetch(`${process.env.COLLECTOR_URL}/sc/v0/get/${this.props.id}`, { headers: { - Authorization: "Basic " + btoa("user1:pw1") + Authorization: "Bearer " + localStorage.getItem("token") } }) // TODO: Look at `status` or return code or both? @@ -35,7 +35,7 @@ class ObjectView extends React.Component { if (json.status != "success") throw `Unexpected status from soc_collector: ${json.status}`; this.setState({ - object: json.data + object: json.docs }); }) .catch(e => this.props.setError(e)); -- cgit v1.1