|
@ -3,7 +3,7 @@ |
|
|
async function projectGet (ctx) { |
|
|
async function projectGet (ctx) { |
|
|
try { |
|
|
try { |
|
|
const models = ctx.fs.dc.models; |
|
|
const models = ctx.fs.dc.models; |
|
|
const { type, entryName } = ctx.query; |
|
|
const { type, entryName, doneState } = ctx.query; |
|
|
|
|
|
|
|
|
let findOption = { |
|
|
let findOption = { |
|
|
where: { |
|
|
where: { |
|
@ -19,6 +19,13 @@ async function projectGet (ctx) { |
|
|
$like: `%${entryName}%` |
|
|
$like: `%${entryName}%` |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (doneState) { |
|
|
|
|
|
if (doneState == 'true') { |
|
|
|
|
|
findOption.where.done = true |
|
|
|
|
|
} else if (doneState == 'false') { |
|
|
|
|
|
findOption.where.done = false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const projectRes = await models.Project.findAll(findOption) |
|
|
const projectRes = await models.Project.findAll(findOption) |
|
|
|
|
|
|
|
|