diff --git a/supabase/functions/admin-invite-user/index.ts b/supabase/functions/admin-invite-user/index.ts index 80ef7d4..d009905 100644 --- a/supabase/functions/admin-invite-user/index.ts +++ b/supabase/functions/admin-invite-user/index.ts @@ -7,7 +7,7 @@ const corsHeaders = { "Access-Control-Allow-Methods": "POST, OPTIONS", }; -type Role = "admin" | "attorney" | "staff"; +type Role = "admin" | "attorney" | "paralegal" | "legal_clerk" | "staff"; interface InviteBody { email: string; @@ -63,7 +63,7 @@ Deno.serve(async (req) => { headers: { ...corsHeaders, "Content-Type": "application/json" }, }); } - if (!["admin", "attorney", "staff"].includes(body.role)) { + if (!["admin", "attorney", "paralegal", "legal_clerk", "staff"].includes(body.role)) { return new Response(JSON.stringify({ error: "Invalid role" }), { status: 400, headers: { ...corsHeaders, "Content-Type": "application/json" }, diff --git a/supabase/functions/admin-update-role/index.ts b/supabase/functions/admin-update-role/index.ts index e6ba98e..7437cb4 100644 --- a/supabase/functions/admin-update-role/index.ts +++ b/supabase/functions/admin-update-role/index.ts @@ -46,7 +46,7 @@ Deno.serve(async (req) => { } const { user_id, role } = (await req.json()) as { user_id: string; role: Role }; - if (!user_id || !["admin", "attorney", "staff"].includes(role)) { + if (!user_id || !["admin", "attorney", "paralegal", "legal_clerk", "staff"].includes(role)) { return new Response(JSON.stringify({ error: "Invalid input" }), { status: 400, headers: { ...corsHeaders, "Content-Type": "application/json" },