From b6a3b67dc18be5b4b7b38700ace12801393759ab Mon Sep 17 00:00:00 2001 From: J-onasJones Date: Thu, 24 Oct 2024 01:52:16 +0200 Subject: [PATCH] added big qr code site --- src/index.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/index.js b/src/index.js index fc3eaf8..808d793 100644 --- a/src/index.js +++ b/src/index.js @@ -15,6 +15,8 @@ export default { return await handleDefaultGet(env); case '/all': return await handleAllGet(env); + case '/qr': + return await handleQrGet(env); case '/manage': return await handleManageGet(env); case '/manage/upload': @@ -267,6 +269,52 @@ async function handleManageGet(env) { `, { headers: { 'Content-Type': 'text/html' } }); } +async function handleQrGet(env) { + const index = await getIndex(env); + const selectedFile = index.find((file) => file.selected); + + return new Response(` + + + QR Code - Tutorium Resources + + + +
+ QR Code +
+ + + + `, { headers: { 'Content-Type': 'text/html' } }); +} + // POST for "/manage/select" async function handleSelect(request, env) {