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
214 B
TypeScript

import type { NextApiRequest, NextApiResponse } from 'next'
export default function handler(_req: NextApiRequest, res: NextApiResponse) {
res.setDraftMode({ enable: false })
res.end('Check your cookies...')
}