From 45032d127db4ed04a63392c71da0d982be98ffdd Mon Sep 17 00:00:00 2001 From: yerzhan_assanov2 Date: Tue, 15 Sep 2026 07:17:22 +0000 Subject: [PATCH] =?UTF-8?q?v2:=20=D0=BB=D0=B8=D1=87=D0=BD=D1=8B=D0=B9=20?= =?UTF-8?q?=D0=BA=D0=B0=D0=B1=D0=B8=D0=BD=D0=B5=D1=82=20=E2=80=94=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20=D0=B7=D0=B0=D1=8F?= =?UTF-8?q?=D0=B2=D0=BA=D0=B8=20=D0=BF=D0=BE=20email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cabinet.html | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++ index.html | 3 +- server.js | 8 ++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 cabinet.html diff --git a/cabinet.html b/cabinet.html new file mode 100644 index 0000000..51de416 --- /dev/null +++ b/cabinet.html @@ -0,0 +1,104 @@ + + + + + +Мой кабинет — Хакатон Казахтелеком + + + + + + + + + +
+
+ Хакатон Казахтелеком + + Регистрация + Список участников +
+
+ +
+
+

Мой кабинет

+

Введи email, на который регистрировался — покажем твою заявку и её статус.

+
+
+ +
+
+
+
+ + +
+ +
+ + +
+
+ + + + + + diff --git a/index.html b/index.html index 0f5142a..283e308 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@
Хакатон Казахтелеком - О хакатоне + Мой кабинет Зарегистрироваться
@@ -129,6 +129,7 @@ diff --git a/server.js b/server.js index e83d25f..2770f08 100644 --- a/server.js +++ b/server.js @@ -33,6 +33,14 @@ http.createServer(async (req, res) => { return res.end(JSON.stringify(readItems())); } + if (req.method === "GET" && url === "/api/status") { + const q = new URL(req.url, "http://x").searchParams; + const email = (q.get("email") || "").trim().toLowerCase(); + const found = readItems().find(i => i.email.toLowerCase() === email); + res.writeHead(200, { "Content-Type": "application/json" }); + return res.end(JSON.stringify({ ok: true, registration: found || null })); + } + if (req.method === "POST" && url === "/api/register") { const item = await body(req); if (!item.fio || !item.email || !item.phone || !item.city || !item.track || !item.role || !item.experience) {