Skip to content

Commit

Permalink
🐛 always check user's imageUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
alpakar02 committed Feb 2, 2025
1 parent 650cf01 commit e7b2b28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.toyProject7.karrot.chatRoom.persistence.ChatRoomEntity
import com.toyProject7.karrot.chatRoom.service.ChatRoomService
import com.toyProject7.karrot.image.persistence.ImageUrlEntity
import com.toyProject7.karrot.image.service.ImageService
import com.toyProject7.karrot.profile.service.ProfileService
import com.toyProject7.karrot.user.controller.User
import com.toyProject7.karrot.user.service.UserService
import org.springframework.context.annotation.Lazy
Expand All @@ -29,6 +30,7 @@ class ArticleService(
private val articleLikesRepository: ArticleLikesRepository,
private val userService: UserService,
private val imageService: ImageService,
@Lazy private val profileService: ProfileService,
@Lazy private val chatRoomService: ChatRoomService,
) {
@Transactional
Expand Down Expand Up @@ -204,6 +206,7 @@ class ArticleService(
article.updatedAt = Instant.now()
articleRepository.save(article)
}
profileService.refreshPresignedUrlIfExpired(article.seller)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import com.toyProject7.karrot.feed.persistence.FeedLikesRepository
import com.toyProject7.karrot.feed.persistence.FeedRepository
import com.toyProject7.karrot.image.persistence.ImageUrlEntity
import com.toyProject7.karrot.image.service.ImageService
import com.toyProject7.karrot.profile.service.ProfileService
import com.toyProject7.karrot.user.service.UserService
import org.springframework.context.annotation.Lazy
import org.springframework.data.repository.findByIdOrNull
Expand All @@ -27,6 +28,7 @@ class FeedService(
private val userService: UserService,
@Lazy private val commentService: CommentService,
private val imageService: ImageService,
private val profileService: ProfileService,
) {
@Transactional
fun postFeed(
Expand Down Expand Up @@ -184,6 +186,7 @@ class FeedService(
feed.updatedAt = Instant.now()
feedRepository.save(feed)
}
profileService.refreshPresignedUrlIfExpired(feed.author)
}
}

Expand Down

0 comments on commit e7b2b28

Please sign in to comment.