Remove ability to campaign on an artifact version
This commit is contained in:
@@ -268,34 +268,5 @@ module.exports = function (options) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
router.route('/:id/campaign/create')
|
|
||||||
.get(function(request, response, next) {
|
|
||||||
db.ArtifactVersion.findByPk(request.params.id, {
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
association: db.ArtifactVersion.Artifact,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
association: db.ArtifactVersion.TranslationArtifactVersions
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}).then(artifactVersion => {
|
|
||||||
if (artifactVersion) {
|
|
||||||
response.display("campaign-form", {
|
|
||||||
user: request.user,
|
|
||||||
pageTitle: "Campaign - Mantra",
|
|
||||||
campaign: {
|
|
||||||
name: `Campaign for ${artifactVersion.translationArtifactVersions.length} translations of ${artifactVersion.artifact.name}`
|
|
||||||
},
|
|
||||||
translationArtifactVersions: artifactVersion.translationArtifactVersions
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
next()
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
next(error)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return router;
|
return router;
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user