diff --git a/.github/workflows/deploy_develop.yaml b/.github/workflows/deploy_develop.yaml index 33eb4c3..694c954 100644 --- a/.github/workflows/deploy_develop.yaml +++ b/.github/workflows/deploy_develop.yaml @@ -52,3 +52,4 @@ jobs: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} DOCKERHUB_REPO: ${{ secrets.DOCKERHUB_REPO }} + TRENDING_TAGS_API_KEY: ${{ secrets.DEV_TRENDMINERFUN_TRENDING_TAGS_API_KEY }} diff --git a/src/trending-tags/services/trending-tags.service.ts b/src/trending-tags/services/trending-tags.service.ts index a405d57..37a3e5a 100644 --- a/src/trending-tags/services/trending-tags.service.ts +++ b/src/trending-tags/services/trending-tags.service.ts @@ -65,6 +65,11 @@ export class TrendingTagsService { errors: [] as string[], }; + // if data.items length, delete all trending tags + if (data.items.length) { + await this.trendingTagRepository.delete({}); + } + for (const item of data.items) { try { const normalizedTag = this.normalizeTag(item.tag);