Is this an invalid action? Getting a 500 when calling, no error logs
I'm trying to do a simple update call but getting a 500 from prisma, with this message
Error: Invalid `prisma.creators.update()` invocation:{+ data: CreatorsUpdateInput | CreatorsUncheckedUpdateInput,+ where: {+ id?: Int,+ userId?: Int+ }}Argument data is missing.Argument where is missing.Note: Lines with + are required
Error: Invalid `prisma.creators.update()` invocation:{+ data: CreatorsUpdateInput | CreatorsUncheckedUpdateInput,+ where: {+ id?: Int,+ userId?: Int+ }}Argument data is missing.Argument where is missing.Note: Lines with + are required
This is my action:
export const modifyVerificationStatusCreator = async ({ verify, idToUpdate, userIdToUpdate }, context) => { if (!verify || !idToUpdate) { throw new Error('Both `verify` and `idToUpdate` are required.'); } console.log(verify, idToUpdate); if (!context.user) { throw new HttpError(401); } return await context.entities.Creators.update({ where: { id: idToUpdate, userId: userIdToUpdate, }, data: { verified: verify, }, });};
export const modifyVerificationStatusCreator = async ({ verify, idToUpdate, userIdToUpdate }, context) => { if (!verify || !idToUpdate) { throw new Error('Both `verify` and `idToUpdate` are required.'); } console.log(verify, idToUpdate); if (!context.user) { throw new HttpError(401); } return await context.entities.Creators.update({ where: { id: idToUpdate, userId: userIdToUpdate, }, data: { verified: verify, }, });};
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.