Skip to content

Commit a932bd8

Browse files
committed
Removed pointless code from index.js
1 parent d09c7a1 commit a932bd8

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

index.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,6 @@ app.get('/y/*', cors({ origin: false }), async (req, res, next) => {
4242
}
4343
});
4444

45-
app.get('/y/*', cors({ origin: false }), async (req, res, next) => {
46-
try {
47-
const reqTarget = `https://raw.githubusercontent.com/retrobowl-unblocked/retrobowl-unblocked.github.io/main/${req.params[0]}`;
48-
const asset = await fetch(reqTarget);
49-
50-
if (asset.ok) {
51-
const data = await asset.arrayBuffer();
52-
res.end(Buffer.from(data));
53-
} else {
54-
next();
55-
}
56-
} catch (error) {
57-
console.error('Error fetching:', error);
58-
next(error);
59-
}
60-
});
61-
6245
routes.forEach((route) => {
6346
app.get(route.path, (req, res) => {
6447
res.sendFile(path.join(__dirname, 'static', route.file));

0 commit comments

Comments
 (0)