mirror of
https://github.com/screentinker/screentinker.git
synced 2026-08-17 07:34:15 -06:00
11 lines
392 B
JavaScript
11 lines
392 B
JavaScript
const { db } = require('./db/database');
|
|
const bcrypt = require('bcryptjs');
|
|
|
|
const email = 'ivandro.work@gmail.com';
|
|
const password = '#whatever';
|
|
const hash = bcrypt.hashSync(password, 10);
|
|
|
|
db.prepare('UPDATE users SET password_hash = ?, role = ? WHERE email = ?').run(hash, 'platform_admin', email);
|
|
if (typeof db.sync === 'function') db.sync();
|
|
console.log('Password and role updated');
|