feat: vylepšení funkce objednávání
CI / Generate TypeScript types (push) Successful in 1m24s
CI / Build server (push) Successful in 26s
CI / Build client (push) Successful in 41s
CI / Server unit tests (push) Successful in 3m25s
CI / Playwright E2E tests (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled
CI / Notify (push) Has been cancelled

This commit is contained in:
2026-05-10 08:24:01 +02:00
parent 03f4e438a3
commit 3ba5fdd086
8 changed files with 88 additions and 28 deletions
+5
View File
@@ -3,6 +3,7 @@ import { getLogin } from "../auth";
import { parseToken, formatDate } from "../utils";
import { generateQr } from "../qr";
import { addPendingQr } from "../pizza";
import { markGroupQrGenerated } from "../groups";
import { emitToUser } from "../websocket";
import { GenerateQrData } from "../../../types";
import crypto from "crypto";
@@ -57,6 +58,10 @@ router.post("/generate", async (req: Request<{}, any, GenerateQrData["body"]>, r
emitToUser(recipient.login, 'pendingQr', pendingQr);
}
if (groupId) {
await markGroupQrGenerated(login, groupId);
}
res.status(200).json({ success: true, count: recipients.length });
} catch (e: any) {
next(e);