fix api and add apartment info

This commit is contained in:
DenAntonov
2025-06-07 00:48:51 +03:00
parent ea691536ac
commit 0500497fc1
4 changed files with 254 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ const { getSupabaseClient } = require('./supabaseClient');
// GET /profile
router.get('/profile', async (req, res) => {
const { user_id } = req.body;
const { user_id } = req.query;
const supabase = getSupabaseClient();
let { data: userData, error: userError } = await supabase.auth.admin.getUserById(user_id);
@@ -23,7 +23,6 @@ router.get('/profile', async (req, res) => {
username: profileData.full_name,
avatar_url: profileData.avatar_url,
phone: userData.user.phone,
apartment: '9',
updated_at: profileData.updated_at
});
});