fix: when no folders

This commit is contained in:
Takeshi Kimata
2024-06-09 10:35:21 +09:00
parent cb5592ef12
commit 369cd09c1c
6 changed files with 35 additions and 15 deletions

View File

@@ -39,7 +39,7 @@ function verifyVisibleMiddleware(sequelize) {
// find project id from folderId
const folder = await Folder.findByPk(folderId);
const projectId = folder && folder.id;
const projectId = folder && folder.projectId;
if (!projectId) {
return res.status(404).send('failed to find projectId');
}
@@ -103,7 +103,7 @@ function verifyVisibleMiddleware(sequelize) {
// find project id from runId
const run = await Run.findByPk(runId);
const projectId = run && run.id;
const projectId = run && run.projectId;
if (!projectId) {
return res.status(404).send('failed to find projectId');
}