Skip to content

Commit

Permalink
[FIX] 태그 검색 JPA 방식으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jsangmin99 committed Nov 4, 2024
1 parent cfdab7c commit 7f4c053
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 7f4c053

Please sign in to comment.