We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb5d005 commit 332f2e2Copy full SHA for 332f2e2
1 file changed
src/containers/Main/Helpers/SwapiFetch/SwapiFetch.js
@@ -63,7 +63,7 @@ export const getSwapiData = async (resourceType, searchTerm) => {
63
64
try {
65
//Make API call and retrieve the data
66
- const response = await axios(`${PATH_BASE}${resourceType}?${PARAM_SEARCH}`
+ const response = await axios(`${PATH_BASE}${resourceType}/?${PARAM_SEARCH}`
67
+ `${searchTerm}`, { cancelToken: cancelToken.token });
68
//Filter the reponse results to show an array of object values/labels
69
const suggestions = response.data.results.map( item => {
0 commit comments