Fix response messages for type parameter validation in API
This commit is contained in:
parent
d8b09526fc
commit
4f10bdce29
1 changed files with 2 additions and 2 deletions
4
index.ts
4
index.ts
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue