We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18b0de2 commit aed6719Copy full SHA for aed6719
src/routes/deletePages.ts
@@ -2,7 +2,7 @@ import { jwtClaims } from '#src/app';
2
import { db, validateUuid } from '#src/utils';
3
4
export const deletePages = async ({ request, reply }) => {
5
- const req = request.body;
+ const req = request.query;
6
7
if (!Array.isArray(req.pageIds)) {
8
return {
@@ -24,7 +24,7 @@ export const deletePages = async ({ request, reply }) => {
24
25
let deletedIds = [];
26
for (const url of req.pageIds) {
27
- const deletedId = (await db.query(`
+ const deletedId = await (await db.query(`
28
DELETE FROM "urls" WHERE "id"=$1 AND "user_id"=$2 RETURNING "id"
29
`, [url, jwtClaims.sub])).rows.map(obj => obj.id);
30
deletedIds.push(deletedId);
0 commit comments