Fix QR code generation, new scanner styling and ability to choose events.
This commit is contained in:
@@ -16,15 +16,8 @@ interface EmailResult {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
async function generateQRCode(participant: Participant, eventId: string): Promise<string> {
|
||||
const qrCodeData = JSON.stringify({
|
||||
participantId: participant.id,
|
||||
eventId: eventId,
|
||||
name: participant.name,
|
||||
surname: participant.surname
|
||||
});
|
||||
|
||||
const qrCodeBase64 = await QRCode.toDataURL(qrCodeData, {
|
||||
async function generateQRCode(participantId: string): Promise<string> {
|
||||
const qrCodeBase64 = await QRCode.toDataURL(participantId, {
|
||||
type: 'image/png',
|
||||
margin: 2,
|
||||
scale: 8
|
||||
@@ -43,7 +36,7 @@ async function sendEmailToParticipant(
|
||||
supabase: any
|
||||
): Promise<EmailResult> {
|
||||
try {
|
||||
const qrCodeBase64Data = await generateQRCode(participant, eventId);
|
||||
const qrCodeBase64Data = await generateQRCode(participant.id);
|
||||
|
||||
// Send email with QR code
|
||||
await sendGmail(refreshToken, {
|
||||
|
||||
Reference in New Issue
Block a user