Unverified Commit 67fd72b7 authored by Yuji Matsumoto's avatar Yuji Matsumoto Committed by GitHub

Fix preview-mode docs/examples typo (#11345)

be know => be known
parent 074c60e0
...@@ -74,7 +74,7 @@ Your headless CMS might allow you to include a variable in the preview URL so th ...@@ -74,7 +74,7 @@ Your headless CMS might allow you to include a variable in the preview URL so th
```js ```js
export default async (req, res) => { export default async (req, res) => {
// Check the secret and next parameters // Check the secret and next parameters
// This secret should only be know to this API route and the CMS // This secret should only be known to this API route and the CMS
if (req.query.secret !== 'MY_SECRET_TOKEN' || !req.query.slug) { if (req.query.secret !== 'MY_SECRET_TOKEN' || !req.query.slug) {
return res.status(401).json({ message: 'Invalid token' }) return res.status(401).json({ message: 'Invalid token' })
} }
......
...@@ -2,7 +2,7 @@ import { getPreviewPostBySlug } from '../../lib/api' ...@@ -2,7 +2,7 @@ import { getPreviewPostBySlug } from '../../lib/api'
export default async (req, res) => { export default async (req, res) => {
// Check the secret and next parameters // Check the secret and next parameters
// This secret should only be know to this API route and the CMS // This secret should only be known to this API route and the CMS
if ( if (
req.query.secret !== process.env.NEXT_EXAMPLE_CMS_DATOCMS_PREVIEW_SECRET || req.query.secret !== process.env.NEXT_EXAMPLE_CMS_DATOCMS_PREVIEW_SECRET ||
!req.query.slug !req.query.slug
......
...@@ -2,7 +2,7 @@ import { getPreviewPostBySlug } from '../../lib/api' ...@@ -2,7 +2,7 @@ import { getPreviewPostBySlug } from '../../lib/api'
export default async (req, res) => { export default async (req, res) => {
// Check the secret and next parameters // Check the secret and next parameters
// This secret should only be know to this API route and the CMS // This secret should only be known to this API route and the CMS
if ( if (
req.query.secret !== process.env.NEXT_EXAMPLE_CMS_SANITY_PREVIEW_SECRET || req.query.secret !== process.env.NEXT_EXAMPLE_CMS_SANITY_PREVIEW_SECRET ||
!req.query.slug !req.query.slug
......
...@@ -2,7 +2,7 @@ import { getPreviewPostBySlug } from '../../lib/api' ...@@ -2,7 +2,7 @@ import { getPreviewPostBySlug } from '../../lib/api'
export default async (req, res) => { export default async (req, res) => {
// Check the secret and next parameters // Check the secret and next parameters
// This secret should only be know to this API route and the CMS // This secret should only be known to this API route and the CMS
if ( if (
req.query.secret !== req.query.secret !==
process.env.NEXT_EXAMPLE_CMS_TAKESHAPE_PREVIEW_SECRET || process.env.NEXT_EXAMPLE_CMS_TAKESHAPE_PREVIEW_SECRET ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment