Pre-cleanup commit: Current state before service layer consolidation
This commit is contained in:
21
backend/scripts/test_exec_sql.js
Normal file
21
backend/scripts/test_exec_sql.js
Normal file
@@ -0,0 +1,21 @@
|
||||
require('dotenv').config();
|
||||
const { createClient } = require('@supabase/supabase-js');
|
||||
|
||||
const supabaseUrl = process.env.SUPABASE_URL;
|
||||
const supabaseKey = process.env.SUPABASE_SERVICE_KEY;
|
||||
const supabase = createClient(supabaseUrl, supabaseKey);
|
||||
|
||||
async function testFunction() {
|
||||
try {
|
||||
const { error } = await supabase.rpc('exec_sql', { sql: 'SELECT 1' });
|
||||
if (error) {
|
||||
console.error('Error calling exec_sql:', error);
|
||||
} else {
|
||||
console.log('Successfully called exec_sql.');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error:', error);
|
||||
}
|
||||
}
|
||||
|
||||
testFunction();
|
||||
Reference in New Issue
Block a user