itslekan
CCConvex Community
•Created by itslekan on 12/17/2024 in #support-community
Database Structure Help
Hey I need a little help trying to structure my database. I'm making a tenant management app. There are multiple managers and each manager can create multiple properties and add one tenant per property. There is a page that allows the manager to view all his tenants but for that to work I need to get all their properties and then get all the tenants under each property
It feels really tedieous and I was wondering if there is a smarter more proper way to do this
I feel like the tenant should also have a manager_id field but I don't know if that's how it should be done
The tree normally looks like manager -> property -> tenant but now it's make it
manager-> property -> tenant
but also manager -> tenant
13 replies
CCConvex Community
•Created by itslekan on 12/10/2024 in #support-community
Error: `headers` was called outside a request scope.
I recently switched devices and I wanted to continue working on my project. So I pulled all the code from github and ran convex dev. Everything seemed to be working find and even the env's got filled in as well. This project is currently running in production on vercel so I know it works. But when I try to run it I keep getting this error
After some debugging. I've norrowed down the problem to be in the
convexAuthNextjsMiddleware
. I cleared my previous middleware and copy pasted the default middleware and still the same error. I can't figure out what I'm doing wrong.
I'll appreciate any help I could get. Thank you.3 replies
CCConvex Community
•Created by itslekan on 11/30/2024 in #support-community
nextjs handling server-side errors in error page
I'm using Nextjs, and I've setup a catch all error page to handle all errors, I've set it up to show formatted convex Errors if it's
instanceof ConvexError
see code below:
This works fine when the error comes from client side, but it completely breaks for server side requests like fetchQuery
. I've looked through the docs and this is not addressed at all.
here's the error. As you can see it's not the usual that has the data
key.
Any help with this would be appreciated.
Thanks6 replies
CCConvex Community
•Created by itslekan on 10/18/2024 in #support-community
Server ErrorUncaught Error: Uncaught TypeError: "pkcs8" must be PKCS#8 formatted string
I keep getthing this error when I try to sign in with convex auth "Password"
Any Ideas
6 replies