the-tip-top-backend/scripts/get-client-password.js
2025-11-17 23:47:54 +01:00

26 lines
762 B
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { pool } from '../db.js';
const getClientInfo = async () => {
const result = await pool.query(`
SELECT email, first_name, last_name, created_at
FROM users
WHERE email = 'client1@example.com'
`);
if (result.rows.length > 0) {
const client = result.rows[0];
console.log('\n📋 CLIENT TEST:\n');
console.log(`Email: ${client.email}`);
console.log(`Nom: ${client.first_name} ${client.last_name}`);
console.log(`Créé le: ${client.created_at}`);
console.log('\n⚠ MOT DE PASSE PAR DÉFAUT: Client123!');
console.log('(Si vous avez changé le mot de passe, utilisez celui que vous avez défini)\n');
} else {
console.log('❌ Client non trouvé');
}
await pool.end();
};
getClientInfo();