From 2abbb7ab3fcc8e4a2aad0472b131c4a684ba3c70 Mon Sep 17 00:00:00 2001 From: Shu Uesugi Date: Sun, 8 Mar 2020 16:58:11 -0700 Subject: [PATCH] Typo on preview mode documentation (#10892) --- docs/advanced-features/preview-mode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced-features/preview-mode.md b/docs/advanced-features/preview-mode.md index 64c7c0ff8947746..d15b3d8229a006e 100644 --- a/docs/advanced-features/preview-mode.md +++ b/docs/advanced-features/preview-mode.md @@ -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' }) } @@ -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