From ed789aa4bbbd367a20236b8f4d606262dd45133b Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Mon, 21 Feb 2022 10:50:05 -0800 Subject: [PATCH] Reroute /api and /api/v0 to our docs page --- web/next.config.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/web/next.config.js b/web/next.config.js index f7af9f74..f030ed91 100644 --- a/web/next.config.js +++ b/web/next.config.js @@ -1,3 +1,6 @@ +const API_DOCS_URL = + 'https://manifoldmarkets.notion.site/Manifold-Markets-API-5e7d0aef4dcf452bb04b319e178fabc5' + /** @type {import('next').NextConfig} */ module.exports = { reactStrictMode: true, @@ -8,4 +11,18 @@ module.exports = { images: { domains: ['lh3.googleusercontent.com'], }, + async redirects() { + return [ + { + source: '/api', + destination: API_DOCS_URL, + permanent: false, + }, + { + source: '/api/v0', + destination: API_DOCS_URL, + permanent: false, + }, + ] + }, }