From 2f03560ef1eb46e3c34e4d8a2cec4ef51ab46c16 Mon Sep 17 00:00:00 2001 From: Dhaverd Date: Wed, 2 Apr 2025 16:44:39 +0800 Subject: [PATCH] =?UTF-8?q?=D0=B2=20=D0=BF=D1=83=D0=B1=D0=BB=D0=B8=D1=87?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= =?UTF-8?q?=D0=B0=D1=85=20=D1=83=D0=B1=D1=80=D0=B0=D0=BB=20=D0=BC=D0=B8?= =?UTF-8?q?=D0=B4=D0=BB=D0=B2=D0=B0=D1=80=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/middleware/auth.js | 3 +++ resources/publicWishlist.js | 9 ++++++++- resources/views/Public.vue | 6 +++--- .../{ShowWhishlist.vue => ShowWishlist.vue} | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) rename resources/views/PublicWishlist/{ShowWhishlist.vue => ShowWishlist.vue} (99%) diff --git a/resources/js/middleware/auth.js b/resources/js/middleware/auth.js index 854418b..bdd22c8 100644 --- a/resources/js/middleware/auth.js +++ b/resources/js/middleware/auth.js @@ -5,6 +5,9 @@ function auth(to, from, next){ if (to.path === '/'){ next({path: '/wishlist'}); } + if (to.path.includes('/api')){ + next(); + } if (to.path === '/auth_options' || to.path === '/login' || to.path === '/registration'){ if (useUserStore().token !== null){ next({path: '/wishlist'}); diff --git a/resources/publicWishlist.js b/resources/publicWishlist.js index d5e129f..9f4de12 100644 --- a/resources/publicWishlist.js +++ b/resources/publicWishlist.js @@ -16,6 +16,13 @@ const vuetify = createVuetify({ const pinia = createPinia() -import router from './js/router.js' +// import router from './js/router.js' +const routes = [ +] + +const router = createRouter({ + history: createMemoryHistory(), + routes, +}) createApp(PublicApp).use(vuetify).use(router).use(pinia).mount("#app") diff --git a/resources/views/Public.vue b/resources/views/Public.vue index 0bf9519..cc5fafa 100644 --- a/resources/views/Public.vue +++ b/resources/views/Public.vue @@ -44,7 +44,7 @@ - + @@ -53,7 +53,7 @@