浏览代码

fix strapi call with env

Benjamin Kornblum 5 月之前
父节点
当前提交
7456b558fd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/stores/component.ts

+ 1 - 1
src/stores/component.ts

@@ -22,7 +22,7 @@ export const useComponentStore = defineStore('components', {
     },
 
     async fetchComponents() {
-      const response = await axios.get(import.meta.env.VITE_STRAPI_URL + '/api/components?locale=' + this.locale, {
+      const response = await axios.get(import.meta.env.VITE_STRAPI_URL + '/components?locale=' + this.locale, {
         headers: {
           Authorization: "Bearer " + import.meta.env.VITE_STRAPI_TOKEN,
         },