diff --git a/src/main/java/org/hankki/hankkiserver/api/favorite/service/FavoriteCommandService.java b/src/main/java/org/hankki/hankkiserver/api/favorite/service/FavoriteCommandService.java index e271c3a9..569f9ef5 100644 --- a/src/main/java/org/hankki/hankkiserver/api/favorite/service/FavoriteCommandService.java +++ b/src/main/java/org/hankki/hankkiserver/api/favorite/service/FavoriteCommandService.java @@ -100,7 +100,9 @@ private void checkTitleExists(final String title, final User user){ } private void copySharedFavoriteStore(final long sharedId, final Favorite myFavorite) { - findStoresById(sharedId).forEach(it -> favoriteStoreUpdater.save(FavoriteStore.create(it, myFavorite))); + List storesInFavoriteStore = findStoresById(sharedId); + storesInFavoriteStore.forEach(it -> favoriteStoreUpdater.save(FavoriteStore.create(it, myFavorite))); + myFavorite.updateImageByFavoriteStoreCount(storesInFavoriteStore.size()); } private List findStoresById(final long id) {