Skip to content

Commit

Permalink
Add @transactional to importCsv method
Browse files Browse the repository at this point in the history
  • Loading branch information
leingenm committed Aug 29, 2024
1 parent a1e9004 commit 3bc8989
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/ypm/service/youtube/ImportService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.ypm.persistence.repository.VideoRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import java.io.BufferedReader;
Expand All @@ -18,6 +19,7 @@ public class ImportService {

private final VideoRepository videoRepository;

@Transactional
public List<VideoImport> importCsv(MultipartFile file) throws IOException {
final List<VideoImport> videos = new ArrayList<>();

Expand Down

0 comments on commit 3bc8989

Please sign in to comment.