Compare commits

..

No commits in common. "daa19a06be3fe073651a39f216301e57c2a0254c" and "a4ee893af5253698870c50bb662c639c17dc42c2" have entirely different histories.

2 changed files with 8 additions and 8 deletions

@ -7,7 +7,7 @@ const wspf = require('websocket-polyfill');
const WebSocket = require('ws');
const xmpp = require('simple-xmpp');
var db = new sqlite3.Database('nip26.db');
var db = new sqlite3.Database('delegations.db');
let { bech32, bech32m } = require('bech32');
let letsCID;
@ -39,15 +39,15 @@ if (fs.existsSync('./config.ini')) {
const now = new Date();
const validUntil = now.getTime() + (30 * 24 * 60 * 60 * 1000);
const insertStmt = db.prepare('INSERT INTO users (pnum, token) VALUES (?, ?)');
insertStmt.run(from.split("@")[0], validUntil);
insertStmt.run(from, validUntil);
insertStmt.finalize();
console.log('Data inserted successfully');
// db.close((err) => {
// if (err) {
// return console.error('Error closing the database:', err.message);
// }
// console.log('Database connection closed.');
// });
db.close((err) => {
if (err) {
return console.error('Error closing the database:', err.message);
}
console.log('Database connection closed.');
});
debug();
}
else {

Binary file not shown.