Files
performance-evaluation-system/backend/update-passwords-final.ts

18 lines
488 B
TypeScript

import * as dotenv from 'dotenv';
dotenv.config();
import pool from './src/config/database';
async function run() {
const password = '123456';
await pool.query('UPDATE user SET password = ? WHERE username = ?', [password, 'xinxin']);
await pool.query('UPDATE user SET password = ? WHERE username = ?', [password, 'lister']);
console.log('xinxin 密码已更新为 123456');
console.log('lister 密码已更新为 123456');
await pool.end();
}
run().catch(console.error);