Skip to content

Commit 0124c86

Browse files
adust api to use published
1 parent a7e5d75 commit 0124c86

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

app/api/devto/route.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const sanityWriteClient = createClient({
1212
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET,
1313
token: process.env.SANITY_API_WRITE_TOKEN,
1414
apiVersion: '2022-03-07',
15-
perspective: 'raw'
15+
perspective: 'published',
16+
useCdn: false
1617
});
1718

1819
export async function POST(request: Request) {

app/api/hashnode/route.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const sanityWriteClient = createClient({
1212
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET,
1313
token: process.env.SANITY_API_WRITE_TOKEN,
1414
apiVersion: '2022-03-07',
15-
perspective: 'raw'
15+
perspective: 'published',
16+
useCdn: false
1617
});
1718

1819
export async function POST(request: Request) {

app/api/youtube/views/route.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const sanityWriteClient = createClient({
77
dataset: process.env.NEXT_PUBLIC_SANITY_DATASET,
88
token: process.env.SANITY_API_WRITE_TOKEN,
99
apiVersion: '2022-03-07',
10-
perspective: 'raw'
10+
perspective: 'published',
11+
useCdn: false
1112
});
1213

1314
export async function GET(request: NextRequest) {

0 commit comments

Comments
 (0)