oneeach
oneeach
NNuxt
Created by marz on 8/8/2024 in #❓・help
Request response not updated
4 replies
NNuxt
Created by marz on 8/8/2024 in #❓・help
Request response not updated
Try this: const { data, execute: getBook } = await useFetch('https://mysite.local/api/books', { lazy: true, server: false, immediate: false, watch: false, credentials: "include", onResponse({ response }) { console.log(response._data) } });
4 replies
NNuxt
Created by lav on 8/1/2024 in #❓・help
Middleare for Auth
no, it's not normal. The middleware should run before you can see the page. Where are you putting your middleware? Can you recreate your middleware here: https://nuxt.new/s/v3
21 replies
NNuxt
Created by lav on 8/1/2024 in #❓・help
Middleare for Auth
it's also good practice to throw an error to notify users they are trying to access an unauthorized page with something like this in your middleware: if (!localStorage.getItem('loggedIn')) { throw createError({ statusCode: 403, statusMessage: 'Unauthorized' }) }
21 replies
NNuxt
Created by lav on 8/1/2024 in #❓・help
Middleare for Auth
you would need to make your middleware global to apply to all pages or you can define which middleware applies to a specific page by adding it to your PageMeta: definePageMeta({ middleware: 'auth' }) If you go with the global method, you would then need to specify which routes are accessible to users not logged in with something like this: definePageMeta({ auth: false, }) To make middleware global, just append 'global.ts' to the filename. like auth.global.ts
21 replies
NNuxt
Created by Furnaxe on 8/1/2024 in #❓・help
Execute a useFetch 2 times
can you replicate the error here: https://stackblitz.com/
8 replies
NNuxt
Created by Furnaxe on 8/1/2024 in #❓・help
Execute a useFetch 2 times
why are you calling refresh() within the useFetch?
8 replies
NNuxt
Created by Furnaxe on 8/1/2024 in #❓・help
Execute a useFetch 2 times
what is your refresh() function?
8 replies
NNuxt
Created by Zack Plauché on 8/1/2024 in #❓・help
Init new Nuxt project without "Initialize git repository" check?
npx nuxi init frontend --packageManager yarn --git-init=false https://nuxt.com/docs/api/commands/init#options
3 replies
NNuxt
Created by george.x.r on 8/1/2024 in #❓・help
ssr calls to api do not work
it looks like you're making a call to /api/strapi/retrieve-data and not /api/get-data
4 replies
NNuxt
Created by benwis on 7/31/2024 in #❓・help
Argument of type '{}' is not assignable to parameter of type
that is because you have it set to required in the prop. If you want to make that optional, set required to false.
7 replies
NNuxt
Created by benwis on 7/31/2024 in #❓・help
Argument of type '{}' is not assignable to parameter of type
also, which vue extention are you using in VSCode?
7 replies
NNuxt
Created by benwis on 7/31/2024 in #❓・help
Argument of type '{}' is not assignable to parameter of type
are you calling the component PanelsNetworkStatsListPanel anywhere without specitying the prop foobar?
7 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
I'm not sure, maybe create an issue on the sitemap gitlab page?
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
not laravel, your nuxt app
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
I mean on your mcmodels.net server, do you have error in your log there?
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
or do you see a query on your laravel log?
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
do you see anything in your server logs?
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
61 replies
NNuxt
Created by Joshua on 7/31/2024 in #❓・help
Dynamic Sitemap Generation not working in production
oh I guess that's the same one lol
61 replies