Download next.js/examples/cms-sanity/app/api/draft-mode/enable/route.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 247 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-sanity/app/api/draft-mode/enable/route.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-sanity/app/api/draft-mode/enable/route.ts
-
curl -L -o route.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-sanity/app/api/draft-mode/enable/route.ts
247 Bytes
| import { defineEnableDraftMode } from "next-sanity/draft-mode"; | |
| import { client } from "@/sanity/lib/client"; | |
| import { token } from "@/sanity/lib/token"; | |
| export const { GET } = defineEnableDraftMode({ | |
| client: client.withConfig({ token }), | |
| }); | |