Implemented test run editor's bulk test case selection

This commit is contained in:
Takeshi Kimata
2024-04-21 12:28:30 +09:00
parent 41133f8270
commit d6cba787e2
7 changed files with 197 additions and 11 deletions

View File

@@ -11,6 +11,18 @@ module.exports = function (sequelize) {
const caseId = req.query.caseId;
try {
// Check if the record already exists
const existingRunCase = await RunCase.findOne({
where: {
runId: runId,
caseId: caseId
}
});
if (existingRunCase) {
return res.status(400).send("Record already exists");
}
const newRunCase = await RunCase.create(
{
runId: runId,