From 70b89021420eddcd6936fc21b4b253ffd7a4a112 Mon Sep 17 00:00:00 2001 From: cp-dharti-r Date: Fri, 5 Jul 2024 14:31:04 +0530 Subject: [PATCH] Refactor query for posts by tag --- nuxt-frontend/stores/tags/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nuxt-frontend/stores/tags/index.js b/nuxt-frontend/stores/tags/index.js index 888ab1fb0..51a813e2c 100644 --- a/nuxt-frontend/stores/tags/index.js +++ b/nuxt-frontend/stores/tags/index.js @@ -18,7 +18,7 @@ export const useTagListStore = defineStore("tag-list", { this.isLoading = true; this.error = null; - let published = showDrafts ? "is_published=false" : "is_published=true"; + let published = `is_published=${!showDrafts}`; let url = config.API_BASE + "/api/posts/tags/" + slug + "?" + published;