Skip to content

Commit

Permalink
Fixed typos in delete/page
Browse files Browse the repository at this point in the history
  • Loading branch information
azdak committed Dec 20, 2024
1 parent 1e689bd commit 18b0de2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/routes/deletePages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export const deletePages = async ({ request, reply }) => {
if (!Array.isArray(req.pageIds)) {
return {
status: "error",
message: `${req.urls.stringify()} is not an array of URLs.`
message: `${req.urls.stringify()} is not an array of page IDs.`
};
} else {
for (const url of req.pageIds) {
if (!validateUuid(url)) {
return {
status: "error",
message: `${url} is not a valid url.`,
message: `${url} is not a valid page ID.`,
};
}
}
Expand All @@ -26,7 +26,7 @@ export const deletePages = async ({ request, reply }) => {
for (const url of req.pageIds) {
const deletedId = (await db.query(`
DELETE FROM "urls" WHERE "id"=$1 AND "user_id"=$2 RETURNING "id"
`, [request.query.ageId, jwtClaims.sub])).rows.map(obj => obj.id);
`, [url, jwtClaims.sub])).rows.map(obj => obj.id);
deletedIds.push(deletedId);
};

Expand Down

0 comments on commit 18b0de2

Please sign in to comment.