From a5a01f392b7967c7b70f4ac7724168708647b54b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20=C3=81lvarez?= Date: Tue, 11 Jan 2022 17:32:26 +0100 Subject: [PATCH] api url --- frontend/src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/App.js b/frontend/src/App.js index 8378974..6daac0a 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -74,7 +74,7 @@ export default class App extends Component { const hash = window.location.hash.replace(/^#/, '') if (hash && hash !== 'close' && hash !== 'help' && hash !== this.state.response.hash) { - axios.get(this.apiUrl, { params: { hash } }).then((res) => { + axios.get('/api/preg', { params: { hash } }).then((res) => { this.setState({ ...res.data, response: {} }, () => { this.api() }) @@ -101,7 +101,7 @@ export default class App extends Component { api = () => { const { response, help, ...state } = this.state - axios.post(this.apiUrl, state).then((res) => { + axios.post('/api/preg', state).then((res) => { this.setState({ response: res.data }, () => { if ('hash' in res.data) { window.location.hash = '#'+res.data.hash;