fix: Prevent moving documents into drafts
This commit is contained in:
@@ -904,6 +904,10 @@ router.post(
|
||||
userId: user.id,
|
||||
});
|
||||
authorize(user, "update", parent);
|
||||
|
||||
if (!parent.publishedAt) {
|
||||
throw InvalidRequestError("Cannot move document inside a draft");
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user