feat: API

This commit is contained in:
2023-02-27 09:05:23 -06:00
parent 552cb408aa
commit d598427d42
9 changed files with 404 additions and 57 deletions

View File

@@ -50,8 +50,8 @@ const checkIsUrl = (path) => {
}
const generateImage = (base64, cb = () => {}) => {
let qr_svg = qr.image(base64, { type: 'svg', margin: 4 });
qr_svg.pipe(require('fs').createWriteStream('./mediaSend/qr-code.svg'));
let qr_svg = qr.image(base64, { type: 'png', margin: 4 });
qr_svg.pipe(require('fs').createWriteStream('./public/bot.qr.png'));
console.log(`⚡ Recuerda que el QR se actualiza cada minuto ⚡'`);
console.log(`⚡ Actualiza F5 el navegador para ver el QR mas reciente⚡`);
cb()