Working on dealing with the QR codes re-generating too easily.

This commit is contained in:
Scott Idem
2024-08-15 18:04:14 -04:00
parent 46cc89ad92
commit 002c283c68
5 changed files with 71 additions and 22 deletions

View File

@@ -34,10 +34,14 @@ export async function generate_qr_code(
log_lvl?: number
}
) {
console.log(`*** generate_qr_code() *** qr_id=${qr_id}`);
if (log_lvl) {
console.log(`*** generate_qr_code() *** qr_id=${qr_id}`);
}
let endpoint = `/qr/${account_id}/${qr_id}`;
console.log('Endpoint', endpoint);
if (log_lvl) {
console.log('Endpoint', endpoint);
}
let params: key_val = {
'regen': true, // Regenerate the file even if nothing has changed.
'return_file': return_blob,
@@ -73,7 +77,9 @@ export async function generate_qr_code(
params['str'] = str;
}
console.log('Params', params);
if (log_lvl) {
console.log('Params', params);
}
// let filename = `qr_${$ae_loc.account_id}_${qr_id}_${qr_type}.png`;
@@ -88,7 +94,7 @@ export async function generate_qr_code(
auto_download: false,
log_lvl: log_lvl
});
console.log('QR Badge ID done?');
console.log('QR code generated done!?');
if (return_blob) {
let img_blob = new Blob([ae_promises.generate_qr_code.data]);