-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck_db.js
More file actions
25 lines (22 loc) · 800 Bytes
/
Copy pathcheck_db.js
File metadata and controls
25 lines (22 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { createClient } from '@supabase/supabase-js';
import dotenv from 'dotenv';
dotenv.config();
const supabase = createClient(process.env.VITE_SUPABASE_URL, process.env.VITE_SUPABASE_ANON_KEY);
async function check() {
console.log("Fetching documents...");
const { data, error } = await supabase
.from('documents')
.select('*')
.eq('storage_type', 'google_drive')
.order('created_at', { ascending: false })
.limit(5);
if (error) {
console.error("Error:", error);
} else {
console.log("Last 5 Google Drive links:");
data.forEach(d => {
console.log(`- ID: ${d.id}, Name: ${d.name}, email_verif: ${d.email_verification}, allowed: ${d.allowed_email}, user_id: ${d.user_id}`);
});
}
}
check();