mirror of
https://github.com/modelec/urlsh-qrcode.git
synced 2026-01-18 16:57:25 +01:00
change path
This commit is contained in:
2
index.ts
2
index.ts
@@ -6,7 +6,7 @@ Bun.serve({
|
||||
async fetch(req) {
|
||||
const url = new URL(req.url);
|
||||
if (req.method === "POST") {
|
||||
if (url.pathname === "/admin") {
|
||||
if (url.pathname === "/admin/add") {
|
||||
if (req.body) {
|
||||
const { urlData, password } = await req.json() as { urlData: string, password: string };
|
||||
if (urlData && password === Bun.env.ADMIN_PASSWORD) {
|
||||
|
||||
Reference in New Issue
Block a user