We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98407ea commit f691362Copy full SHA for f691362
demos/default/pages/api/revalidate.js
@@ -1,9 +1,10 @@
1
export default async function handler(req, res) {
2
try {
3
- await res.revalidate('/getStaticProps/with-revalidate/')
4
- console.log('Revalidated', req.url)
+ const path = '/getStaticProps/with-revalidate/'
+ await res.revalidate(path)
5
+ console.log('Revalidated:', path)
6
return res.json({ revalidated: true })
7
} catch (err) {
- return res.status(500).send('Error revalidating')
8
+ return res.status(500).send('Error revalidating:', err)
9
}
10
0 commit comments