Skip to content
Snippets Groups Projects
Commit 062223eb authored by Andrei Cioromila's avatar Andrei Cioromila
Browse files

feat(collection): remove redundand check for fragment existance

parent c5f10a4e
No related branches found
No related tags found
2 merge requests!136Sprint 22 features (updates),!125HIN-1066
...@@ -20,11 +20,6 @@ module.exports = models => async (req, res) => { ...@@ -20,11 +20,6 @@ module.exports = models => async (req, res) => {
collection = await models.Collection.find(collectionId) collection = await models.Collection.find(collectionId)
const fragmentId = collection.fragments[0] const fragmentId = collection.fragments[0]
if (!collection.fragments.includes(fragmentId))
return res.status(400).json({
error: `Collection and fragment do not match.`,
})
fragment = await models.Fragment.find(fragmentId) fragment = await models.Fragment.find(fragmentId)
const authsome = authsomeHelper.getAuthsome(models) const authsome = authsomeHelper.getAuthsome(models)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment