feat: Implement shop ID association for 'barbearia' users and refine shop data queries.

This commit is contained in:
2026-03-10 14:51:19 +00:00
parent 77ca82bd39
commit 254e9f31c7
4 changed files with 45 additions and 4 deletions

16
test.mjs Normal file
View File

@@ -0,0 +1,16 @@
import { createClient } from '@supabase/supabase-js';
const supabaseUrl = 'https://jqklhhpyykzrktikjnmb.supabase.co';
const supabaseAnonKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Impxa2xoaHB5eWt6cmt0aWtqbm1iIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjgzODQ0MDgsImV4cCI6MjA4Mzk2MDQwOH0.QsPuBnyUtRPSavlqKj3IGR9c8juT02LY_hSi-j3c6M0';
const supabase = createClient(supabaseUrl, supabaseAnonKey);
async function check() {
const { data: profiles, error: err1 } = await supabase.from('profiles').select('*');
const { data: shops, error: err2 } = await supabase.from('shops').select('*');
console.log("Profiles:", profiles?.map(p => ({ id: p.id, role: p.role, name: p.name, shop_name: p.shop_name })));
console.log("Shops:", shops?.map(s => ({ id: s.id, name: s.name })));
}
check();