Files
mugladijitalmedya/scratch/update_contact.js

25 lines
732 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
require('dotenv').config({ path: '.env.local' });
const postgres = require('postgres');
const sql = postgres(process.env.DATABASE_URL);
async function updateSettings() {
try {
await sql`
UPDATE settings
SET
contact_email = 'info@mugladijitalmedya.com',
contact_phone = '0545 431 10 24',
office_address = 'Emirbeyazıt, Fevzi Altınay Sk. Evim apt no 3, 48050 Menteşe/Muğla'
WHERE id = (SELECT id FROM settings LIMIT 1)
`;
console.log('İletişim bilgileri başarıyla güncellendi.');
} catch (error) {
console.error('Hata:', error);
} finally {
await sql.end();
}
}
updateSettings();