From d994a21a0dfae9ee026e8aa3ccdee6c213c523aa Mon Sep 17 00:00:00 2001 From: Emiliano Ciavatta Date: Tue, 29 Sep 2020 18:56:00 +0200 Subject: Complete rules page --- frontend/src/views/Connections.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frontend/src/views/Connections.js') diff --git a/frontend/src/views/Connections.js b/frontend/src/views/Connections.js index f3fec64..64068c5 100644 --- a/frontend/src/views/Connections.js +++ b/frontend/src/views/Connections.js @@ -75,7 +75,7 @@ class Connections extends Component { } this.setState({loading: true, prevParams: params}); - let res = await backend.getJson(`${url}?${urlParams}`); + let res = (await backend.getJson(`${url}?${urlParams}`)).json; let connections = this.state.connections; let firstConnection = this.state.firstConnection; @@ -115,7 +115,7 @@ class Connections extends Component { let flagRule = this.state.flagRule; let rules = this.state.rules; if (flagRule === null) { - rules = await backend.getJson("/api/rules"); + rules = (await backend.getJson("/api/rules")).json; flagRule = rules.filter(rule => { return rule.name === "flag"; })[0]; -- cgit v1.2.3-70-g09d2