qr code - responsive

This commit is contained in:
DerJesen
2025-11-29 13:50:40 +01:00
parent f0b2e19494
commit 4d1291766b
6 changed files with 151 additions and 77 deletions

View File

@@ -26,8 +26,12 @@ export class TicketsService {
});
try {
// Generate QR code buffer from ticket ID
const qrCodeBuffer = await QRCode.toBuffer(ticket.id, {
// Generate QR code buffer with same format as frontend
const qrCodeData = JSON.stringify({
id: ticket.id,
type: ticket.ticketType
});
const qrCodeBuffer = await QRCode.toBuffer(qrCodeData, {
errorCorrectionLevel: 'H', // High error correction
type: 'png', // Output as PNG image
width: 250, // QR code width
@@ -70,7 +74,12 @@ export class TicketsService {
}
try {
const qrCodeBuffer = await QRCode.toBuffer(ticket.id, {
// Generate QR code buffer with same format as frontend
const qrCodeData = JSON.stringify({
id: ticket.id,
type: ticket.ticketType
});
const qrCodeBuffer = await QRCode.toBuffer(qrCodeData, {
errorCorrectionLevel: 'H',
type: 'png',
width: 250,