When I made a custom api, I added user as an entity, but in the context it is empty
This is my main.wasp api socialPostMakerText { httpRoute: (POST, "/api/social-post-maker-text"), fn: import { getText } from "@src/server/socialMediaMakerPostText.js", entities: [User] }
This is when I console log the context
context { [ Server ] user: undefined, [ Server ] entities: { [ Server ] User: { [ Server ] findUnique: [Function (anonymous)], [ Server ] findUniqueOrThrow: [Function (anonymous)], [ Server ] findFirst: [Function (anonymous)], [ Server ] findFirstOrThrow: [Function (anonymous)], [ Server ] findMany: [Function (anonymous)], [ Server ] create: [Function (anonymous)], [ Server ] createMany: [Function (anonymous)], [ Server ] update: [Function (anonymous)], [ Server ] updateMany: [Function (anonymous)], [ Server ] upsert: [Function (anonymous)], [ Server ] delete: [Function (anonymous)], [ Server ] deleteMany: [Function (anonymous)], [ Server ] groupBy: [Function (anonymous)], [ Server ] count: [Function (anonymous)], [ Server ] aggregate: [Function (anonymous)], [ Server ] findRaw: [Function (anonymous)], [ Server ] aggregateRaw: [Function (anonymous)], [ Server ] name: 'User' [ Server ] }
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
W
Wasp
Rails-like framework for React, Node.js and Prisma. Build your app in a day and deploy it with a single CLI command.