api forwarding issue

This commit is contained in:
Russell2259
2024-01-23 20:55:40 -07:00
parent 856eb9a50e
commit 9de93ab30b
+2 -2
View File
@@ -24,7 +24,7 @@ const routes = (app) => {
} catch (e) { next(); }
});
app.get('/api/analytics/script.js', async (req, res) => {
app.get('/api/analytics/script.js', async (req, res, next) => {
try {
const request = await fetch('https://api.polarislearning.org/analytics/script.js');
const buffer = Buffer.from(await request.arrayBuffer());
@@ -33,7 +33,7 @@ const routes = (app) => {
} catch (e) { next(); }
});
app.post('/api/analytics/api/send', async (req, res) => {
app.post('/api/analytics/api/send', async (req, res, next) => {
try {
const request = await fetch('https://api.polarislearning.org/analytics/api/send', {
method: 'POST',