fix: 创建问卷remark允许空 (#82)

This commit is contained in:
luch 2024-03-27 14:13:57 +08:00 committed by GitHub
parent c7fa38fefb
commit 39e89a4651
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,8 +51,8 @@ export class SurveyController {
req,
) {
const validationResult = await Joi.object({
remark: Joi.string().required(),
title: Joi.string().required(),
remark: Joi.string().allow(null).default(''),
surveyType: Joi.string().when('createMethod', {
is: 'copy',
then: Joi.allow(null),