Files
tg_tinder_bot/set-premium.js
2025-09-18 08:31:14 +09:00

25 lines
1.0 KiB
JavaScript
Raw 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.


const { query } = require('./dist/database/connection');
async function setPremium() {
try {
// Установка премиума для всех пользователей
const result = await query(
UPDATE users
SET premium = true,
premium_expires_at = NOW() + INTERVAL '1 year'
);
console.log('Premium set for all users successfully!');
console.log(Updated users);
process.exit(0);
} catch (error) {
console.error('Error setting premium:', error);
process.exit(1);
}
}
setPremium();