bug fix + ux improvements
This commit is contained in:
@@ -21,7 +21,7 @@ export default async function postLink(
|
||||
}
|
||||
|
||||
if (!link.collection.name) {
|
||||
link.collection.name = "Unnamed Collection";
|
||||
link.collection.name = "Unorganized";
|
||||
}
|
||||
|
||||
link.collection.name = link.collection.name.trim();
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -125,7 +125,7 @@ const fileNotFoundTemplate = `<!DOCTYPE html>
|
||||
<h2>It is possible that the file you're looking for either doesn't exist or hasn't been created yet.</h2>
|
||||
<h3>Some possible reasons are:</h3>
|
||||
<ul>
|
||||
<li>You are trying to access a file too early, before it has been fully archived.</li>
|
||||
<li>You are trying to access a file too early, before it has been fully archived. In this case, refreshing the page might resolve the issue.</li>
|
||||
<li>The file doesn't exist either because it encountered an error while being archived, or it simply doesn't exist.</li>
|
||||
</ul>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user