Files
StevenandGitHub f56722c971 fix: add missing draftMode type to GetServerSidePropsContext (#50184)
This `draftMode` prop was missing from the previous PR:

- https://github.com/vercel/next.js/pull/48669 

It was added on `GetStaticPropsContext` but not on
`GetServerSidePropsContext` so this PR fixes it.

---------
2023-05-22 15:16:12 -07:00

7 lines
181 B
TypeScript

import type { NextApiRequest, NextApiResponse } from 'next'
export default (req: NextApiRequest, res: NextApiResponse) => {
const { draftMode } = req
res.json({ draftMode })
}