silverwolf-x's picture
download
raw
363 Bytes
import { draftMode } from 'next/headers'
import { NextRequest, NextResponse } from 'next/server'
export async function GET(req: NextRequest) {
const status = req.nextUrl.searchParams.get('status')
if (status === 'enable') {
;(await draftMode()).enable()
} else {
;(await draftMode()).disable()
}
return NextResponse.json({
status,
})
}

Xet Storage Details

Size:
363 Bytes
·
Xet hash:
b36e314a3da4b89ff5fdd049824c1289925f150c96efa7bc628485f36c990396

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.