Skip to content

Commit

Permalink
fix: support both API versions in frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
zameji committed Jun 3, 2024
1 parent e31872a commit b67ff30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,12 @@ export default new Vuex.Store({
.then((response) => {
let time2 = performance.now();
commit("setResponseTime", time2 - time1);
commit("setSearchResults", response.data);
if (response.data) {
// Response from new API
commit("setSearchResults", response.data);
} else {
commit("setSearchResults", response);
}
commit("setLoading", false);
commit("setError", false);
})
Expand Down

0 comments on commit b67ff30

Please sign in to comment.