diff --git a/.drone.yml b/.drone.yml index c59843d..78a8145 100644 --- a/.drone.yml +++ b/.drone.yml @@ -49,7 +49,7 @@ steps: # build - name: build pull: if-not-exists - image: node:16.14.0 + image: node:14.16.1 commands: - npm run build when: diff --git a/src/app.controller.ts b/src/app.controller.ts index 9a4606b..9134fc6 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -165,15 +165,15 @@ export class AppController { @Post("/visitor") async create(@Body() data: CreateVisitor) { - if (new Date(data.apply_date).toString() == "Invalid Date") { - throw new BadRequestException("apply_date 格式不正确") - } - if (new Date(data.start_date).toString() == "Invalid Date") { - throw new BadRequestException("start_date 格式不正确") - } - if (new Date(data.end_date).toString() == "Invalid Date") { - throw new BadRequestException("end_date 格式不正确") - } + // if (new Date(data.apply_date).toString() == "Invalid Date") { + // throw new BadRequestException("apply_date 格式不正确") + // } + // if (new Date(data.start_date).toString() == "Invalid Date") { + // throw new BadRequestException("start_date 格式不正确") + // } + // if (new Date(data.end_date).toString() == "Invalid Date") { + // throw new BadRequestException("end_date 格式不正确") + // } return await this.dataSource.transaction(async transactionalEntityManager => { const new_node_visitor = new NodeVisitorEntity();