Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import static org.websoso.WSSServer.exception.error.CustomUserNovelError.NOT_EVALUATED;
import static org.websoso.WSSServer.exception.error.CustomUserNovelError.USER_NOVEL_ALREADY_EXISTS;

import jakarta.transaction.Transactional;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand All @@ -13,6 +12,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.websoso.WSSServer.user.domain.User;
import org.websoso.WSSServer.dto.keyword.KeywordGetResponse;
import org.websoso.WSSServer.dto.userNovel.UserNovelCreateRequest;
Expand Down Expand Up @@ -108,6 +108,7 @@ public void updateEvaluation(User user, Long novelId, UserNovelUpdateRequest req
* @param user 사용자 객체
* @param novelId 소설 ID
*/
@Transactional
public void deleteEvaluation(User user, Long novelId) {
UserNovel userNovel = libraryService.getLibraryOrException(user, novelId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import lombok.RequiredArgsConstructor;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.websoso.WSSServer.user.domain.User;
import org.websoso.WSSServer.exception.exception.CustomUserNovelException;
import org.websoso.WSSServer.library.domain.UserNovel;
Expand All @@ -27,6 +28,7 @@ public class LibraryInterestApplication {
* @param user 사용자 객체
* @param novelId 소설 ID
*/
@Transactional
public void registerAsInterest(User user, Long novelId) {
Novel novel = novelService.getNovelOrException(novelId);

Expand All @@ -53,6 +55,7 @@ public void registerAsInterest(User user, Long novelId) {
* @param user 사용자 객체
* @param novelId 소설 ID
*/
@Transactional
public void unregisterAsInterest(User user, Long novelId) {
UserNovel userNovel = libraryService.getLibraryOrException(user, novelId);

Expand Down
Loading