Skip to content

Commit 332f2e2

Browse files
fix api call
1 parent eb5d005 commit 332f2e2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/containers/Main/Helpers/SwapiFetch/SwapiFetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const getSwapiData = async (resourceType, searchTerm) => {
6363

6464
try {
6565
//Make API call and retrieve the data
66-
const response = await axios(`${PATH_BASE}${resourceType}?${PARAM_SEARCH}`
66+
const response = await axios(`${PATH_BASE}${resourceType}/?${PARAM_SEARCH}`
6767
+ `${searchTerm}`, { cancelToken: cancelToken.token });
6868
//Filter the reponse results to show an array of object values/labels
6969
const suggestions = response.data.results.map( item => {

0 commit comments

Comments
 (0)