Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
22yeets22 authored and actions-user committed Mar 19, 2024
1 parent 466a18d commit d028435
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ app.get("/misc/*", async (req, res, next) => {
await fetchData(req, res, next, baseUrl, secondaryUrl);
});

async function fetchData(req, res, next, baseUrl, secondaryUrl=null) {
async function fetchData(req, res, next, baseUrl, secondaryUrl = null) {
const reqTarget = `${baseUrl}/${req.params[0]}`;
try {
const asset = await fetch(reqTarget);
Expand All @@ -47,7 +47,7 @@ async function fetchData(req, res, next, baseUrl, secondaryUrl=null) {
res.end(Buffer.from(data));
return;
}

const indexReqTarget = `${baseUrl}/${req.params[0]}/index.html`;
const indexAsset = await fetch(indexReqTarget);
if (indexAsset.ok) {
Expand Down

0 comments on commit d028435

Please sign in to comment.