Skip to content

Commit

Permalink
[#136] fix: 유저 태그 히스토리 도메인 삭제 (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdomo authored Nov 12, 2023
1 parent 84620b2 commit 9ea8fa8
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 138 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import com.todaysfail.domains.failure.service.FailureDomainService;
import com.todaysfail.domains.tag.domain.Tag;
import com.todaysfail.domains.tag.service.TagDomainService;
import com.todaysfail.domains.usertaghistory.domain.UserTagHistory;
import com.todaysfail.domains.usertaghistory.port.UserTagHistoryCommandPort;
import java.util.List;
import java.util.stream.Collectors;
import lombok.RequiredArgsConstructor;
Expand All @@ -25,7 +23,6 @@ public class FailureRegisterUseCase {
private final CategoryQueryPort categoryQueryPort;
private final FailureDomainService failureDomainService;
private final TagDomainService tagDomainService;
private final UserTagHistoryCommandPort userTagHistoryCommandPort;

@Transactional
public FailureResponse execute(FailureRegisterRequest request) {
Expand All @@ -44,9 +41,6 @@ public FailureResponse execute(FailureRegisterRequest request) {
.secret(request.secret())
.build();
Failure registeredFailure = failureDomainService.register(failure, category, tags);
tags.stream()
.map(tag -> UserTagHistory.registerUserTagHistory(currentUserId, tag.getId()))
.forEach(userTagHistoryCommandPort::save);
return failureMapper.toFailureResponse(registeredFailure);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.todaysfail.api.web.tag.dto.response.TagResponse;
import com.todaysfail.api.web.tag.usecase.TagPopularUseCase;
import com.todaysfail.api.web.tag.usecase.TagSearchUseCase;
import com.todaysfail.api.web.tag.usecase.UserTagHistoryQueryUseCase;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand All @@ -22,7 +21,6 @@
public class TagController {
private final TagSearchUseCase tagSearchUseCase;
private final TagPopularUseCase tagPopularUseCase;
private final UserTagHistoryQueryUseCase userTagHistoryQueryUseCase;

@Operation(summary = "태그를 검색합니다. (5개)")
@GetMapping("/search")
Expand All @@ -39,10 +37,4 @@ public List<TagResponse> popular() {
// @Operation(summary = "추천 태그를 조회합니다.")
// @GetMapping("/recommend")
// TODO: 추천 태그 조회 API 구현

@Operation(summary = "유저 태그 히스토리를 조회합니다. (5개)")
@GetMapping("/history")
public List<TagResponse> userTagHistory() {
return userTagHistoryQueryUseCase.execute();
}
}

This file was deleted.

0 comments on commit 9ea8fa8

Please sign in to comment.