Skip to content

v2.3.1

Compare
Choose a tag to compare
@foyarash foyarash released this 19 Aug 15:50
· 15 commits to master since this release

Breaking change

The NextCrud function is now asynchronous, which requires to change the way you are creating the handler.

Old version:

const handler = NextCrud({
  adapter: new PrismaAdapter({
    prismaClient: myPrismaClientInstance,
  }),
})

export default handler

New version:

const handler = async (req, res) => {
  const nextCrudHandler = await NextCrud({
    adapter: new PrismaAdapter({
      prismaClient: myPrismaClientInstance,
    }),
  })

  return nextCrudHandler(req, res)
}

export default handler