fix: complete ebay integer validation test coverage
This commit is contained in:
1 parent
3e4e35c9ae
commit
abdd39d65c
2 files changed
+73
-8
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user