Tracker with filter ability

This commit is contained in:
kngako
2022-06-19 03:38:27 +02:00
parent 4d02795a45
commit f89bbf9573
2 changed files with 27 additions and 8 deletions

View File

@@ -1151,6 +1151,9 @@ module.exports = function (options) {
if (project) {
db.TranslationChapter.findAll({
include: [
{
association: db.TranslationChapter.Chapter,
},
{
association: db.TranslationChapter.TranslationChunks,
include: [
@@ -1186,9 +1189,16 @@ module.exports = function (options) {
}
]
},
{
association: db.TranslationArtifactVersion.Dialect
},
request.query.dialectId ? {
association: db.TranslationArtifactVersion.Dialect,
required: true,
where: {
id: request.query.dialectId
}
} : {
association: db.TranslationArtifactVersion.Dialect,
}
,
]
}
]