fix: complete ebay integer validation test coverage

This commit is contained in:
2026-04-29 00:56:37 -04:00
parent 3e4e35c9ae
commit abdd39d65c
2 changed files with 73 additions and 8 deletions

View File

@@ -36,14 +36,7 @@ export function parseNonNegativeIntegerParam(
{ status: 400 },
);
}
const value = Number(rawValue);
if (value < 0) {
return Response.json(
{ message: `Invalid ${name} parameter` },
{ status: 400 },
);
}
return value;
return Number(rawValue);
}
export function emptySearchResponse(): Response {