summaryrefslogtreecommitdiff
path: root/src/components/List.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/List.js')
-rw-r--r--src/components/List.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/List.js b/src/components/List.js
index 69f2a50..0bf359b 100644
--- a/src/components/List.js
+++ b/src/components/List.js
@@ -54,7 +54,7 @@ class List extends React.Component {
getData() {
fetch(`${process.env.COLLECTOR_URL}/sc/v0/get?${this.queryString()}`, {
headers: {
- Authorization: "Basic " + btoa("user1:pw1")
+ Authorization: "Bearer " + localStorage.getItem("token")
}
})
// TODO: Look at `status` or return code or both?
@@ -70,7 +70,7 @@ class List extends React.Component {
if (json.status != "success")
throw `Unexpected status from soc_collector: ${json.status}`;
this.setState({
- objects: json.data
+ objects: json.docs
});
})
.catch(e => this.props.setError(e));
@@ -95,7 +95,6 @@ class List extends React.Component {
setPage(event, value) {
this.setState({ page: value }, () => {
- console.log(this.state);
this.getData();
window.scrollTo(0, 0);
});