Skip to content

Commit

Permalink
refactor : path
Browse files Browse the repository at this point in the history
  • Loading branch information
NameIsUser06 committed Jan 4, 2024
1 parent 5463ed1 commit 7cec543
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.springframework.stereotype.Service;

import java.io.IOException;
import java.net.URI;
import java.nio.file.Path;
import java.nio.file.Paths;

Expand All @@ -26,7 +25,7 @@ public ResponseEntity<Resource> execute(Long feedId, HttpServletRequest httpServ
Feed feed = feedRepository.findById(feedId).orElseThrow(
() -> FeedNotFoundException.EXCEPTION
);
Path path = Paths.get(URI.create(feed.getUrl()));
Path path = Paths.get(feed.getUrl());
Resource resource = new UrlResource(path.toUri());
String contentType = httpServletRequest.getServletContext().getMimeType(resource.getFile().getAbsolutePath());
return ResponseEntity.ok()
Expand Down

0 comments on commit 7cec543

Please sign in to comment.