feat: inicializar repositorio oficial do clube67.com

This commit is contained in:
VPS 4 Builder
2026-05-18 18:32:55 +02:00
commit a7fd18eb55
96 changed files with 17059 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { db } from '../src/config/database';
async function run() {
try {
const benefits = await db('benefits')
.select('id', 'title', 'public_title', 'public_description', 'public_hide_values')
.limit(5)
.orderBy('updated_at', 'desc');
console.log('Recent Benefits Data:', JSON.stringify(benefits, null, 2));
} catch (error) {
console.error('Error:', error);
} finally {
await db.destroy();
}
}
run();
+26
View File
@@ -0,0 +1,26 @@
import { db } from '../src/config/database';
async function run() {
try {
const id = 1; // Assuming ID 1 exists
const payload = {
public_title: "Teste de Título Público",
public_description: "Descrição pública de teste via script",
public_hide_values: true
};
console.log(`Updating benefit ${id} with:`, payload);
await db('benefits').where({ id }).update(payload);
const updated = await db('benefits').where({ id }).first();
console.log('Updated Benefit:', JSON.stringify(updated, null, 2));
} catch (error) {
console.error('Error:', error);
} finally {
await db.destroy();
}
}
run();