Dex_Vinyl
Dex_Vinyl
NNuxt
Created by Dex_Vinyl on 12/17/2024 in #❓・help
server/api errors using [[ ]].ts files
Hi all, beginner here, so please be gentle lol From reading the internet, i can use a [[xx]].ts file for urls that might not be present eg /api/[something]/is-here/[[or-is-it]] whenever I try to access the api (using postman) at /api/something/is-here i get a 500 error, and i get the same error when i try to access /api/[something]/is-here/yes my file is [[or-is-it]].ts if i change it to index.ts, accessing /api/something/is-here works perfectly fine, as does if i make a folder for [or-is-it] with an index.ts file in it, but i get whinged at becuase of duplicaed code I'm trying to use the or-is-it for page numbers, the code looks for or-is-it and if not found sets it to 1 any advice would be appreciated thanks
10 replies