I am currently working on how to send multiple action parameters with context to a URL. I have been encountering a 400 error in my attempts. The selectedPoint and departurePoint are coming from child components and stored as variables in their data. My code snippet for this scenario is:
async getFlights(context, selectedPoint, departurePoint) {
const res = await fetch(
`http://api.travelpayouts.com/v2/prices/month-matrix?currency=rub&origin=${selectedPoint}&destination=${departurePoint}&show_to_affiliates&token=${context.state.token}`,
);
if (res.ok) {
let result = await res.json();
context.commit('setFlights', result.data);
}
return res.ok;
},