initial commit: project completion with proper gitignore
This commit is contained in:
24
scratch/update_contact.js
Normal file
24
scratch/update_contact.js
Normal file
@@ -0,0 +1,24 @@
|
||||
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();
|
||||
Reference in New Issue
Block a user