WellNuo Lite architecture: - Simplified navigation flow with NavigationController - Profile editing with API sync (/auth/profile endpoint) - OTP verification improvements - ESP WiFi provisioning setup (espProvisioning.ts) - E2E testing infrastructure (Playwright) - Speech recognition hooks (web/native) - Backend auth enhancements This is the stable version submitted to App Store. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
984 B
JavaScript
48 lines
984 B
JavaScript
const { Client } = require('pg');
|
|
|
|
const client = new Client({
|
|
user: 'sergei',
|
|
host: 'eluxnetworks.net',
|
|
database: 'wellnuo_app',
|
|
password: 'W31153Rg31',
|
|
port: 5432,
|
|
ssl: {
|
|
rejectUnauthorized: false
|
|
}
|
|
});
|
|
|
|
const email = process.argv[2];
|
|
|
|
if (!email) {
|
|
console.error('Usage: node fetch-otp.js <email>');
|
|
process.exit(1);
|
|
}
|
|
|
|
async function run() {
|
|
try {
|
|
await client.connect();
|
|
// Get the latest OTP for the email
|
|
const res = await client.query(`
|
|
SELECT code FROM public.otp_codes
|
|
WHERE email = $1
|
|
ORDER BY created_at DESC
|
|
LIMIT 1
|
|
`, [email]);
|
|
|
|
if (res.rows.length > 0) {
|
|
console.log(res.rows[0].code);
|
|
} else {
|
|
console.error('No OTP found');
|
|
process.exit(1);
|
|
}
|
|
|
|
} catch (err) {
|
|
console.error('Database error:', err);
|
|
process.exit(1);
|
|
} finally {
|
|
await client.end();
|
|
}
|
|
}
|
|
|
|
run();
|