workign on canvas api requests

This commit is contained in:
2024-09-10 08:35:07 -06:00
parent 029e3ff7eb
commit f94dcca904
8 changed files with 121 additions and 210 deletions

View File

@@ -1,19 +1,7 @@
/** @type {import('next').NextConfig} */
const token = process.env.NEXT_PUBLIC_CANVAS_TOKEN;
if (!token) {
throw new Error("CANVAS_TOKEN not in environment");
}
const nextConfig = {
async rewrites() {
return [
{
source: "/api/canvas/:rest*",
destination: "https://snow.instructure.com/api/v1/:rest*",
},
];
},
};
export default nextConfig;