From 719e25d8254fd9ab2516f5faf6d2f07af4257792 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Sun, 20 Oct 2024 14:29:11 +0000 Subject: feature: Add DELETE REST APIs for bookmarks, lists and tags --- apps/web/app/api/v1/lists/[listId]/route.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'apps/web/app/api/v1/lists') diff --git a/apps/web/app/api/v1/lists/[listId]/route.ts b/apps/web/app/api/v1/lists/[listId]/route.ts index 205a779f..d3e1f17c 100644 --- a/apps/web/app/api/v1/lists/[listId]/route.ts +++ b/apps/web/app/api/v1/lists/[listId]/route.ts @@ -31,3 +31,19 @@ export const GET = ( }; }, }); + +export const DELETE = ( + req: NextRequest, + { params }: { params: { listId: string } }, +) => + buildHandler({ + req, + handler: async ({ api }) => { + await api.lists.delete({ + listId: params.listId, + }); + return { + status: 204, + }; + }, + }); -- cgit v1.2.3-70-g09d2