19 lines
490 B
TypeScript
19 lines
490 B
TypeScript
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();
|