This commit is contained in:
Sergio Álvarez 2022-01-11 17:32:26 +01:00
parent 6019a40835
commit a5a01f392b
No known key found for this signature in database
GPG Key ID: 622780889DFDBDA5
1 changed files with 2 additions and 2 deletions

View File

@ -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;