minor fix
This commit is contained in:
parent
d2b867c438
commit
8c76b0d141
|
@ -57,6 +57,17 @@ export default async function postLink(
|
|||
});
|
||||
|
||||
link.collection.id = collection.id;
|
||||
|
||||
await prisma.user.update({
|
||||
where: {
|
||||
id: userId,
|
||||
},
|
||||
data: {
|
||||
collectionOrder: {
|
||||
push: link.collection.id,
|
||||
},
|
||||
},
|
||||
});
|
||||
}
|
||||
} else if (link.collection.id) {
|
||||
const collectionIsAccessible = await getPermission({
|
||||
|
@ -83,6 +94,17 @@ export default async function postLink(
|
|||
});
|
||||
|
||||
link.collection.id = unorganizedCollection?.id;
|
||||
|
||||
await prisma.user.update({
|
||||
where: {
|
||||
id: userId,
|
||||
},
|
||||
data: {
|
||||
collectionOrder: {
|
||||
push: link.collection.id,
|
||||
},
|
||||
},
|
||||
});
|
||||
} else {
|
||||
return { response: "Uncaught error.", status: 500 };
|
||||
}
|
||||
|
|
Ŝarĝante…
Reference in New Issue