Skip to content

Commit

Permalink
[feat] 게시글 수정하기 API 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryeolee committed Nov 8, 2023
1 parent 14416fa commit fd1b804
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package modernfarmer.server.farmuscommunity.community.repository;

import modernfarmer.server.farmuscommunity.community.entity.Posting;
import modernfarmer.server.farmuscommunity.community.entity.PostingTag;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
Expand All @@ -12,6 +13,6 @@
public interface PostingTagRepository extends JpaRepository<PostingTag, Long> {

@Modifying
@Query("delete from PostingImage as p where p.id = :postingId and p.imageUrl = :imageUrl")
void deleteImage(@Param("imageUrl") String imageUrl, @Param("postingId") Long postingId);
@Query("delete from PostingTag as p where p.posting = :posting")
void deleteTag( @Param("posting") Posting posting);
}
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public BaseResponseDto updatePosting(
}


postingTagRepository.deleteTag(posting);

boolean ojectUrlResult = objectImageUrl(posting,tags, updateFiles);

Expand Down

0 comments on commit fd1b804

Please sign in to comment.