fix collectionOrder updating + remove index

This commit is contained in:
daniel31x13
2024-02-26 23:59:10 -05:00
parent 4ff7298a3b
commit 4442ce8705
3 changed files with 59 additions and 3 deletions
@@ -47,6 +47,17 @@ export default async function updateCollection(
},
});
await prisma.user.update({
where: {
id: userId,
},
data: {
collectionOrder: {
push: collectionId,
},
},
});
return await prisma.collection.update({
where: {
id: collectionId,