Reroute /api and /api/v0 to our docs page

This commit is contained in:
Austin Chen 2022-02-21 10:50:05 -08:00
parent c32442ab41
commit ed789aa4bb

View File

@ -1,3 +1,6 @@
const API_DOCS_URL =
'https://manifoldmarkets.notion.site/Manifold-Markets-API-5e7d0aef4dcf452bb04b319e178fabc5'
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
module.exports = { module.exports = {
reactStrictMode: true, reactStrictMode: true,
@ -8,4 +11,18 @@ module.exports = {
images: { images: {
domains: ['lh3.googleusercontent.com'], domains: ['lh3.googleusercontent.com'],
}, },
async redirects() {
return [
{
source: '/api',
destination: API_DOCS_URL,
permanent: false,
},
{
source: '/api/v0',
destination: API_DOCS_URL,
permanent: false,
},
]
},
} }