diff --git a/src/mappings/content/commentsAndReactions.ts b/src/mappings/content/commentsAndReactions.ts index d59ebf696..d9d075aa0 100644 --- a/src/mappings/content/commentsAndReactions.ts +++ b/src/mappings/content/commentsAndReactions.ts @@ -218,6 +218,7 @@ async function processVideoReaction( --previousReactionTypeCounter.count // remove reaction videoReactionRepository.remove(existingReaction) + await overlay.updateDatabase() return } // otherwise... @@ -370,6 +371,7 @@ export async function processReactCommentMessage( --comment.reactionsCount // remove reaction commentReactionRepository.remove(existingReaction) + await overlay.updateDatabase() } else { // new reaction const id = commentReactionEntityId({ memberId, commentId, reactionId }) diff --git a/src/mappings/content/utils.ts b/src/mappings/content/utils.ts index 122831238..43047b74e 100644 --- a/src/mappings/content/utils.ts +++ b/src/mappings/content/utils.ts @@ -169,6 +169,7 @@ export async function deleteChannel(overlay: EntityManagerOverlay, channelId: bi overlay.getRepository(BannedMember).remove(...bannedMembers) overlay.getRepository(Channel).remove(channelId.toString()) + await overlay.updateDatabase() // delete channel related notifications } @@ -204,6 +205,7 @@ export async function deleteVideo(overlay: EntityManagerOverlay, videoId: bigint } subtitlesRepository.remove(...subtitles) videoRepository.remove(video) + await overlay.updateDatabase() } export async function processNft( diff --git a/src/mappings/token/utils.ts b/src/mappings/token/utils.ts index 32c5f8a9c..f53be3533 100644 --- a/src/mappings/token/utils.ts +++ b/src/mappings/token/utils.ts @@ -244,12 +244,13 @@ export async function processTokenMetadata( token.description = metadata.description } - // remove all current bnefits + // remove all current benefits const existingBenefit = await overlay .getRepository(Benefit) .getManyByRelation('tokenId', token.id) if (existingBenefit !== undefined) { overlay.getRepository(Benefit).remove(...existingBenefit) + await overlay.updateDatabase() } if (isSet(metadata.benefits)) { @@ -302,6 +303,7 @@ export async function processTokenMetadata( } if (oldTrailer) { trailerVideoRepository.remove(oldTrailer) + await overlay.updateDatabase() } const id = overlay.getRepository(TrailerVideo).getNewEntityId() @@ -316,6 +318,7 @@ export async function processTokenMetadata( const oldTrailer = await trailerVideoRepository.getOneByRelation('tokenId', token.id) if (oldTrailer) { trailerVideoRepository.remove(oldTrailer) + await overlay.updateDatabase() } } }