Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#136] fix: 유저 태그 히스토리 도메인 삭제 #141

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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.

Loading