genyus
WWasp
•Created by genyus on 1/22/2025 in #đŸ™‹questions
Custom endpoint missing context user
I've created a custom API endpoint that needs to be authenticated. As per the documentation, I set the
auth
field to true
, but when a request is received, there's no Authorization header and the context.user
object is null
even though the user is logged in. I'm not sure what I'm missing? Do I need to set the header manually?
For context, I have an API namespace applied to prevent the CORS errors I was experiencing initially.
6 replies
WWasp
•Created by genyus on 12/16/2024 in #đŸ™‹questions
Accessing static files
I need my app to access a collection of static JSON Schema files, but it doesn't seem straightforward to do so. The files are currently positioned in the server/utils/schemas directory, but this directory isn't included in .wasp/out/sdk/wasp/dist/ext-src. It is included in .wasp/out/sdk/ext-src, which is where I'm currently having to reference them from, but I suspect this location won't be valid for the deployed application.
As the
__directory
and __file
magic variables aren't available, here's my current, hacky, implementation:
What's the accepted best practise to accomplish this?19 replies
WWasp
•Created by genyus on 12/5/2024 in #đŸ™‹questions
Broken generator
I'm attempting to configure a third-party generator in my instance. On the first attempt, setting
provider = prisma-docs-generator
produces the following compilation error:
Then a bit more digging online led me to try changing it to provide = node node_modules/prisma-docs-generator
, but that failed with the following error:
What is the correct way to include additional generators?14 replies