un-proxy the api docs

This commit is contained in:
MapleLeaf
2022-01-12 21:14:05 -06:00
parent 7a09e8fdca
commit 2cdd324495
3 changed files with 2 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ export const mainLinks: AppLinkProps[] = [
},
{
type: "internal",
to: "/api",
to: "/api/",
children: (
<>
<CodeIcon className={inlineIconClass} /> API Reference

View File

@@ -1,7 +0,0 @@
import type { LoaderFunction } from "remix"
// loading the api through a resource route lets us receive analytics and remix server logs for api pages
export const loader: LoaderFunction = ({ request, params }) => {
const url = new URL("/", request.url)
return fetch(`${url.toString()}/api-dist/${params["*"]}`)
}