mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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. ---------
7 lines
213 B
TypeScript
7 lines
213 B
TypeScript
import type { NextApiRequest, NextApiResponse } from 'next'
|
|
|
|
export default function handler(_req: NextApiRequest, res: NextApiResponse) {
|
|
res.setDraftMode({ enable: true })
|
|
res.end('Check your cookies...')
|
|
}
|