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 3030689 commit 699ad3aCopy full SHA for 699ad3a
demos/default/pages/api/revalidate.js
@@ -0,0 +1,8 @@
1
+export default async function handler(req, res) {
2
+ try {
3
+ await res.revalidate('/getStaticProps/with-revalidate/')
4
+ return res.json({ revalidated: true })
5
+ } catch (err) {
6
+ return res.status(500).send('Error revalidating')
7
+ }
8
+}
0 commit comments