Pass the entire link to the store & fix bulk update function

This commit is contained in:
Isaac Wise
2024-02-10 15:53:46 -06:00
parent da0533ac36
commit 582607e726
9 changed files with 52 additions and 107 deletions
@@ -1,6 +1,6 @@
import { prisma } from "@/lib/api/db";
import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";
import { Collection, Link, UsersAndCollections } from "@prisma/client";
import { UsersAndCollections } from "@prisma/client";
import getPermission from "@/lib/api/getPermission";
import moveFile from "@/lib/api/storage/moveFile";
@@ -48,9 +48,9 @@ export default async function updateLinkById(
collection: true,
pinnedBy: isCollectionOwner
? {
where: { id: userId },
select: { id: true },
}
where: { id: userId },
select: { id: true },
}
: undefined,
},
});
@@ -111,9 +111,9 @@ export default async function updateLinkById(
collection: true,
pinnedBy: isCollectionOwner
? {
where: { id: userId },
select: { id: true },
}
where: { id: userId },
select: { id: true },
}
: undefined,
},
});