Implement email verification lockout and missing phase 2 items
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
const { Pool } = require('pg');
|
||||
const pool = new Pool({host: 'localhost', port: 5432, user: 'postgres', password: 'password123', database: 'ckqr'});
|
||||
async function run() {
|
||||
try {
|
||||
await pool.query(`
|
||||
CREATE TABLE IF NOT EXISTS app_settings (
|
||||
key VARCHAR(255) PRIMARY KEY,
|
||||
value TEXT,
|
||||
category VARCHAR(50),
|
||||
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
`);
|
||||
console.log('Created app_settings table.');
|
||||
|
||||
await pool.query(`
|
||||
INSERT INTO app_settings (key, value, category) VALUES
|
||||
('smtp_host', 'smtp.office365.com', 'smtp'),
|
||||
('smtp_port', '587', 'smtp'),
|
||||
('smtp_user', 'noreply@cavininfotech.com', 'smtp'),
|
||||
('smtp_pass', 'xmkshjlszjbkcyzb', 'smtp'),
|
||||
('smtp_secure', 'false', 'smtp')
|
||||
ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value;
|
||||
`);
|
||||
console.log('Inserted SMTP settings.');
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
} finally {
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
run();
|
||||
Reference in New Issue
Block a user