fix api and add apartment info
This commit is contained in:
@@ -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
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user