[Search] Request result object destruction

This commit is contained in:
Matej Glasnák committed 2023-04-06 14:55:58 +02:00
1 parent 45197746be
commit 3867635078
1 file changed
+3 -4
+3 -4
View File
@@ -18,7 +18,7 @@ export default {
data() {
return {
searchResults: [],
searchResults: {},
search: ''
}
},
@@ -38,9 +38,8 @@ export default {
methods: {
updateSearchResults: debounce(async function (search) {
try {
this.searchResults = await this.$axios.get_auth(`v1/search?q=${search}`)
// const { mastertasks: mastertasks.data, subtasks: subtasks.data, teams: teams.data}
console.log(this.searchResults)
const { mastertasks, subtasks, teams} = await this.$axios.get_auth(`v1/search?q=${search}`)
this.searchResults = {mastertasks: mastertasks.data, subtasks: subtasks.data, teams: teams.data}
} catch (error) {
this.$toast.error(error)
}