@sarah_edo
.
then
(
(
{
data
}
)
=>
{
console
.
log
(
'
axios result
'
, data)
if
(altMaps
.
hasOwnProperty
(data
.
query
)) {
commit
(
'
newIntent
'
, {
intent
: altMaps[data
.
query
],
score
:
1
})
}
else
{
commit
(
'
newIntent
'
, data
.
topScoringIntent
)
}
commit
(
'
setUiState
'
,
'
idle
'
)
commit
(
'
setZoom
'
)
})
.
catch
(
err
=>
{
console
.
error
(
'
axios error
'
, err)
})
In store.js (Vuex)