Fix response messages for type parameter validation in API

This commit is contained in:
Seth 2025-01-15 13:01:24 -05:00
parent d8b09526fc
commit 4f10bdce29
No known key found for this signature in database
GPG key ID: 8B7A2C60CDF65CAC

View file

@ -65,11 +65,11 @@ Bun.serve({
const name = searchParams.get("name") as string;
if (!type) {
return new Response("Please provide a type parameter, user or orgs", { status: 400 });
return new Response("Please provide a type parameter, users or orgs", { status: 400 });
}
if (type !== "users" && type !== "orgs") {
return new Response("Type parameter must be either user or orgs", { status: 400 });
return new Response("Type parameter must be either users or orgs", { status: 400 });
}
if (!name) {