Skip to content

Commit

Permalink
Fixed validation on delete/pages
Browse files Browse the repository at this point in the history
  • Loading branch information
azdak committed Dec 20, 2024
1 parent 9963051 commit 1e689bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/deletePages.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { jwtClaims } from '#src/app';
import { db, validateUrl, validateUuid } from '#src/utils';
import { db, validateUuid } from '#src/utils';

export const deletePages = async ({ request, reply }) => {
const req = request.body;
Expand All @@ -11,7 +11,7 @@ export const deletePages = async ({ request, reply }) => {
};
} else {
for (const url of req.pageIds) {
if (!validateUrl(url)) {
if (!validateUuid(url)) {
return {
status: "error",
message: `${url} is not a valid url.`,
Expand Down

0 comments on commit 1e689bd

Please sign in to comment.