diff --git a/back/api/cron.ts b/back/api/cron.ts index f748f840..2c9f292a 100644 --- a/back/api/cron.ts +++ b/back/api/cron.ts @@ -189,7 +189,7 @@ export default (app: Router) => { '/', celebrate({ body: Joi.object({ - labels: Joi.array().optional(), + labels: Joi.array().optional().allow(null), command: Joi.string().optional(), schedule: Joi.string().optional(), name: Joi.string().optional(), diff --git a/back/api/env.ts b/back/api/env.ts index aaf57b30..05767b39 100644 --- a/back/api/env.ts +++ b/back/api/env.ts @@ -50,7 +50,7 @@ export default (app: Router) => { body: Joi.object({ value: Joi.string().required(), name: Joi.string().required(), - remarks: Joi.string().optional().allow(''), + remarks: Joi.string().optional().allow('').allow(null), id: Joi.number().required(), }), }), diff --git a/back/services/env.ts b/back/services/env.ts index cb8762d1..ad6c951d 100644 --- a/back/services/env.ts +++ b/back/services/env.ts @@ -87,7 +87,7 @@ export default class EnvService { const encodeText = encodeURIComponent(searchText); const reg = { [Op.or]: [ - { [Op.like]: `%${searchText}&` }, + { [Op.like]: `%${searchText}%` }, { [Op.like]: `%${encodeText}%` }, ], }; diff --git a/back/services/open.ts b/back/services/open.ts index c49c0735..388587c8 100644 --- a/back/services/open.ts +++ b/back/services/open.ts @@ -69,7 +69,7 @@ export default class OpenService { const encodeText = encodeURIComponent(searchText); const reg = { [Op.or]: [ - { [Op.like]: `%${searchText}&` }, + { [Op.like]: `%${searchText}%` }, { [Op.like]: `%${encodeText}%` }, ], };