Skip to content

Commit

Permalink
Typo on preview mode documentation (#10892)
Browse files Browse the repository at this point in the history
  • Loading branch information
chibicode committed Mar 8, 2020
1 parent 178f45b commit 2abbb7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/advanced-features/preview-mode.md
Expand Up @@ -75,7 +75,7 @@ Your headless CMS might allow you to include a variable in the preview URL so th
export default async (req, res) => {
// Check the secret and next parameters
// This secret should only be know to this API route and the CMS
if (req.query.secret !== 'MY_SECRET_TOKEN' || !res.query.slug) {
if (req.query.secret !== 'MY_SECRET_TOKEN' || !req.query.slug) {
return res.status(401).json({ message: 'Invalid token' })
}

Expand All @@ -88,7 +88,7 @@ export default async (req, res) => {
return res.status(401).json({ message: 'Invalid slug' })
}

// Enable Preview Mode by setting the cookies
// Enable Preview Mode by setting the cookies
res.setPreviewData({})

// Redirect to the path from the fetched post
Expand Down

0 comments on commit 2abbb7a

Please sign in to comment.