Skip to content

Commit

Permalink
Merge pull request #435 from boostcampwm-2022/fix/#432-same-author
Browse files Browse the repository at this point in the history
fix(BE): 검색이 이상하게 되는 경우들을 수정하였습니다 -2차
  • Loading branch information
WOOSERK authored Dec 14, 2022
2 parents 14532ed + 1214ae1 commit 0e4f6e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/domain/post/dto/controller-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class SearchResponseDto {
);
}

this.lastId = posts.length == 0 ? -1 : this.getLastId(posts);
this.lastId = posts.length == 0 ? -1 : Number(this.getLastId(posts));
this.isLast = isLast;
}

Expand Down
2 changes: 0 additions & 2 deletions server/src/domain/post/post.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ export class PostController {
await this.addBookmarksToPostIfLogin(headers['authorization'], returnValue);
await this.addSearchHistory(headers['authorization'], inquiryDto);

await this.addSearchHistory(headers['authorization'], inquiryDto);

this.applyTags(tags, lastId);

return returnValue;
Expand Down
2 changes: 1 addition & 1 deletion server/src/domain/post/post.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export class PostService {
for (const result of results) {
authors.push(
this.userRepository.findOneBy({
id: result._source['authorid'],
id: result._source['userid'],
}),
);
images.push(
Expand Down

0 comments on commit 0e4f6e3

Please sign in to comment.