mirror of
https://github.com/lux-tel/websites.git
synced 2026-10-30 20:31:36 +00:00
14 lines
375 B
TypeScript
14 lines
375 B
TypeScript
import { createValidateLinkHandler } from '@session/sanity-cms/api/validate-link';
|
|
import { client } from '@/lib/sanity/sanity.client';
|
|
|
|
const draftToken = process.env.SANITY_API_READ_TOKEN!;
|
|
|
|
if (!draftToken) {
|
|
throw TypeError('SANITY_API_READ_TOKEN is not defined');
|
|
}
|
|
|
|
export const { GET, generateStaticParams } = createValidateLinkHandler({
|
|
draftToken,
|
|
client,
|
|
});
|