Compare commits

..

No commits in common. "bbab76bc7fd8564b448d1773b65c904a4cda4f1c" and "1ccb1d0e7c5ce9f6da0201b17a17a74aac6b1cf5" have entirely different histories.

5 changed files with 4 additions and 12 deletions

View File

@ -1 +0,0 @@
PORT=8000

2
.gitignore vendored
View File

@ -1,5 +1,3 @@
bunker
bunker.db bunker.db
files/ files/
.env

View File

@ -4,8 +4,6 @@
"indentWidth": 4 "indentWidth": 4
}, },
"tasks": { "tasks": {
"check": "deno check main.ts", "check": "deno check main.ts"
"dev": "deno run -A --unstable-ffi --env main.ts",
"compile": "deno compile --allow-net --allow-read --allow-env --allow-write --allow-ffi --allow-run --unstable-ffi --env main.ts"
} }
} }

View File

@ -235,4 +235,4 @@ new oak.Application()
index: "index.html", index: "index.html",
}); });
}) })
.listen({ port: parseInt(Deno.env.get("PORT")!) }); .listen({ port: 8000 });

View File

@ -25,10 +25,7 @@ document.querySelector("#login").onsubmit = async (event) => {
} }
const refer = decodeURIComponent(params.get("refer")); const refer = decodeURIComponent(params.get("refer"));
params.delete("refer") params.delete("refer")
if (params.size === 0) { window.location.search = params.toString();
window.location.pathname = refer; window.location.pathname = refer;
return;
}
window.location = `${refer}?${params.toString()}`;
}; };