bug fix + ux improvements

This commit is contained in:
Daniel
2023-08-22 00:43:34 -04:00
parent 09ea45eec0
commit acc974ecfe
8 changed files with 168 additions and 105 deletions
+6 -1
View File
@@ -35,8 +35,13 @@ export default async function updateLink(
link.collection.ownerId === userId &&
targetLink?.collection.ownerId === userId;
const authorizedSwitchCollection =
!isCollectionOwner && targetLink?.collection.id === link.collection.id;
console.log(authorizedSwitchCollection);
// Makes sure collection members (non-owners) cannot move a link to/from a collection.
if (!isCollectionOwner)
if (!authorizedSwitchCollection)
return {
response: "You can't move a link to/from a collection you don't own.",
status: 401,