🔧 Create baseUrl utility.

This commit is contained in:
pheralb
2023-12-16 18:10:13 +00:00
parent 8d3590cf35
commit 0d770de827
3 changed files with 12 additions and 4 deletions
+3 -3
View File
@@ -17,21 +17,21 @@ export const GET = ({ url }: RequestEvent) => {
// Error 400 | if limit is not a number:
if (isNaN(limit)) {
throw error(400, {
error(400, {
message: 'Limit must be a number.'
});
}
// Error 400 | If limit is not positive:
if (limit < 1) {
throw error(400, {
error(400, {
message: 'Limit must be a positive number.'
});
}
// Error 400 | If limit is greater than the number of svgs:
if (limit > fullRouteSvgsData.length) {
throw error(400, {
error(400, {
message: 'Limit is greater than the number of svgs.'
});
}