aboutsummaryrefslogtreecommitdiffstats
path: root/web/lib/services
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib/services')
-rw-r--r--web/lib/services/links.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/web/lib/services/links.ts b/web/lib/services/links.ts
index f3ff1757..dbcbe9c4 100644
--- a/web/lib/services/links.ts
+++ b/web/lib/services/links.ts
@@ -1,6 +1,15 @@
import { LinkCrawlerQueue } from "@remember/shared/queues";
import prisma from "@remember/db";
+export async function unbookmarkLink(linkId: string, userId: string) {
+ await prisma.bookmarkedLink.delete({
+ where: {
+ id: linkId,
+ userId,
+ },
+ });
+}
+
export async function bookmarkLink(url: string, userId: string) {
const link = await prisma.bookmarkedLink.create({
data: {