Skip to content

Commit

Permalink
Merge pull request #155 from hw-coconote/fix/tagSearch
Browse files Browse the repository at this point in the history
[FIX] 태그 검색 JPA 방식으로 변경
  • Loading branch information
sseho authored Nov 5, 2024
2 parents cfdab7c + 7f4c053 commit c346699
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/components/thread/TagComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,13 @@ export default {
}
try {
const params = new URLSearchParams();
params.append('workspaceId', localStorage.getItem('workspaceId'));
params.append('page', 0);
params.append('size', 20);
this.selectedTags.forEach(tag => params.append('tags', tag.name));
const response = await axios.get(`${process.env.VUE_APP_API_BASE_URL}/search/threads/by-tags`, { params });
this.searchResults = response.data.result.results;
console.log("this.searchResults: ",this.searchResults);
params.append('channelId', localStorage.getItem('channelId'));
this.selectedTags.forEach(tag => params.append('tagSearchIds', tag.id));
const response = await axios.get(`${process.env.VUE_APP_API_BASE_URL}/tag/search`, { params });
this.searchResults = response.data.result;
console.log("Search results:", this.searchResults);
} catch (error) {
console.error('태그를 통한 검색 중 오류 발생:', error);
Expand Down Expand Up @@ -218,7 +217,7 @@ export default {
display: none;
position: absolute;
top: -7px;
right: -10px;
right: -14px;
background: transparent;
border: none;
cursor: pointer;
Expand Down

0 comments on commit c346699

Please sign in to comment.