Skip to content

Commit

Permalink
📝 Fix post & edit viewCount
Browse files Browse the repository at this point in the history
  • Loading branch information
alpakar02 authored Jan 20, 2025
1 parent 5264927 commit 15e68e1
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FeedService(
feedComments = mutableListOf(),
createdAt = Instant.now(),
updatedAt = Instant.now(),
viewCount = 1,
viewCount = 0,
)
feedRepository.save(feedEntity)
val imagePutPresignedUrls: MutableList<String> = mutableListOf()
Expand Down Expand Up @@ -98,8 +98,6 @@ class FeedService(
}
feedEntity.updatedAt = Instant.now()
}
feedEntity.viewCount += 1
feedRepository.save(feedEntity)
val feed = Feed.fromEntity(feedEntity)
feed.imagePresignedUrl = imagePutPresignedUrls
return feed
Expand Down

0 comments on commit 15e68e1

Please sign in to comment.