-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-db.js
More file actions
23 lines (18 loc) · 819 Bytes
/
Copy pathtest-db.js
File metadata and controls
23 lines (18 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
require('dotenv').config({ path: '.env.local' });
const { createClient } = require('@supabase/supabase-js');
const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL,
process.env.SUPABASE_SERVICE_ROLE_KEY
);
async function check() {
console.log('Checking system_flags...');
const res1 = await supabase.from('system_flags').select('*').limit(1);
console.log('system_flags result:', res1);
console.log('\nChecking active users (profiles.last_active_at)...');
const res2 = await supabase.from('profiles').select('id, suspended, last_active_at, profile_completed').limit(1);
console.log('profiles result:', res2);
console.log('\nChecking user_reports...');
const res3 = await supabase.from('user_reports').select('id').limit(1);
console.log('user_reports result:', res3);
}
check();