Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
245a0dc28f
commit
c15911e8ca
@@ -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" },
|
||||
|
||||
@@ -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" },
|
||||
|
||||
Reference in New Issue
Block a user