diff --git a/packages/component-manuscript-manager/src/routes/collections/patch.js b/packages/component-manuscript-manager/src/routes/collections/patch.js index ce752b64e6898079a20a31e63c9d4054ecf88aa1..d81429c23938e28ee70f02dc3ebea54900336bc3 100644 --- a/packages/component-manuscript-manager/src/routes/collections/patch.js +++ b/packages/component-manuscript-manager/src/routes/collections/patch.js @@ -35,12 +35,9 @@ module.exports = models => async (req, res) => { }) } - if (collectionStatus) { - collection.status = 'deleted' - await collection.save() - const collectionHelper = new Collection({ collection }) - collectionHelper.updateStatus({ newStatus: 'deleted' }) - } + const collectionHelper = new Collection({ collection }) + await collectionHelper.updateStatus({ newStatus: 'deleted' }) + return res.status(200).json(collection) } catch (e) { const notFoundError = await services.handleNotFoundError(e, 'Collection')