1
0
mirror of https://github.com/vercel/commerce.git synced 2025-07-31 22:11:24 +00:00
Files
...[[...slug]]
.github
.vscode
app
[locale]
api
cart
draft
exit-draft
route.ts
og
revalidate
favicon.ico
robots.ts
sitemap.ts
components
e2e
helpers
lib
messages
public
.env.example
.eslintrc.js
.gitignore
.npmrc
.nvmrc
.prettierignore
README.md
components.json
i18n-config.ts
license.md
middleware.ts
next.config.js
package.json
playwright.config.ts
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
commerce/app/api/exit-draft/route.ts
2023-05-16 12:52:44 +02:00

12 lines
206 B
TypeScript

import { draftMode } from 'next/headers';
export async function GET() {
draftMode().disable();
return new Response(null, {
status: 307,
headers: {
Location: `/`,
},
})
}