diff --git a/backend/src/routes/invitations.js b/backend/src/routes/invitations.js index 61a79d5..5caa423 100644 --- a/backend/src/routes/invitations.js +++ b/backend/src/routes/invitations.js @@ -354,8 +354,7 @@ router.post('/', async (req, res) => { id: invitation.id, code: invitation.token, role: role, - email: email || null, - expiresAt: invitation.expires_at + email: email || null } }); @@ -389,7 +388,7 @@ router.get('/beneficiary/:beneficiaryId', async (req, res) => { // Get invitations for this beneficiary const { data: invitations, error } = await supabase .from('invitations') - .select('id, token, role, email, label, expires_at, accepted_at, accepted_by, created_at') + .select('id, token, role, email, label, accepted_at, accepted_by, created_at') .eq('beneficiary_id', beneficiaryId) .order('created_at', { ascending: false }); @@ -417,7 +416,6 @@ router.get('/beneficiary/:beneficiaryId', async (req, res) => { role: inv.role, email: inv.email, label: inv.label, - expiresAt: inv.expires_at, acceptedAt: inv.accepted_at, createdAt: inv.created_at, acceptedBy: acceptedUser ? { @@ -561,7 +559,7 @@ router.get('/', async (req, res) => { // Get invitations const { data: invitations, error } = await supabase .from('invitations') - .select('id, token, role, email, label, beneficiary_id, expires_at, accepted_at, created_at') + .select('id, token, role, email, label, beneficiary_id, accepted_at, created_at') .eq('invited_by', userId) .order('created_at', { ascending: false }); @@ -585,7 +583,6 @@ router.get('/', async (req, res) => { role: inv.role, email: inv.email, label: inv.label, - expiresAt: inv.expires_at, acceptedAt: inv.accepted_at, createdAt: inv.created_at, beneficiary: beneficiary ? {