arabdullah commited on
Commit
4210f76
·
verified ·
1 Parent(s): 2015653

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -1,7 +1,7 @@
1
  const express = require('express');
2
  const fs = require('fs');
3
  const path = require('path');
4
- const qr = require('qr-image');
5
  const makeWASocket = require('@whiskeysockets/baileys').default;
6
  const Boom = require('@hapi/boom');
7
 
@@ -127,7 +127,7 @@ async function connectToWhatsApp(apiKey, ip) {
127
  console.log('Opened connection');
128
  } else if (qr) {
129
  // Send QR code to client
130
- const qrImage = qr.imageSync(qr, { type: 'svg' });
131
  fs.writeFileSync(path.join(sessionDir, `${apiKey}_qr.svg`), qrImage);
132
  }
133
  });
 
1
  const express = require('express');
2
  const fs = require('fs');
3
  const path = require('path');
4
+ const qri = require('qr-image');
5
  const makeWASocket = require('@whiskeysockets/baileys').default;
6
  const Boom = require('@hapi/boom');
7
 
 
127
  console.log('Opened connection');
128
  } else if (qr) {
129
  // Send QR code to client
130
+ const qrImage = qri.imageSync(qr, { type: 'svg' });
131
  fs.writeFileSync(path.join(sessionDir, `${apiKey}_qr.svg`), qrImage);
132
  }
133
  });