From bb14e0aff9a7ba46c779f0f72be36f0aab89394a Mon Sep 17 00:00:00 2001 From: cp-dharti-r Date: Fri, 19 Apr 2024 17:54:18 +0530 Subject: [PATCH] Fix build --- nuxt-frontend/stores/author/index.js | 2 +- nuxt-frontend/stores/resources/index.js | 4 ++-- nuxt-frontend/stores/tags/index.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/nuxt-frontend/stores/author/index.js b/nuxt-frontend/stores/author/index.js index 8d7ee24f8..1153139c0 100644 --- a/nuxt-frontend/stores/author/index.js +++ b/nuxt-frontend/stores/author/index.js @@ -48,7 +48,7 @@ export const useAuthorListStore = defineStore("authors", { this.error = error; this.isLoading = false; this.status = config.NOT_FOUND; - resolve(); + reject(error); }); }); }, diff --git a/nuxt-frontend/stores/resources/index.js b/nuxt-frontend/stores/resources/index.js index 27f33c6f7..bf7f138bf 100644 --- a/nuxt-frontend/stores/resources/index.js +++ b/nuxt-frontend/stores/resources/index.js @@ -121,7 +121,7 @@ export const useBlogDetailStore = defineStore("resources-detail", { }, actions: { async loadResource(slug) { - return new Promise((resolve) => { + return new Promise((resolve, reject) => { this.isLoading = true; this.error = null; let url = config.API_BASE + "/api/posts/" + slug; @@ -139,7 +139,7 @@ export const useBlogDetailStore = defineStore("resources-detail", { this.error = error; this.isLoading = false; this.status = config.NOT_FOUND; - resolve(); + reject(error); }); }); }, diff --git a/nuxt-frontend/stores/tags/index.js b/nuxt-frontend/stores/tags/index.js index 986a8d567..cba48cd6f 100644 --- a/nuxt-frontend/stores/tags/index.js +++ b/nuxt-frontend/stores/tags/index.js @@ -37,7 +37,7 @@ export const useTagListStore = defineStore("tag-list", { this.error = error; this.isLoading = false; this.status = config.NOT_FOUND; - resolve(); + reject(error); }); }); },