From 07a53b7b02ff44597109c2e30cdc4ede390933ab Mon Sep 17 00:00:00 2001 From: rustdreamer Date: Wed, 2 Aug 2023 18:10:52 +0800 Subject: [PATCH] fix --- .drone.yml | 2 +- src/app.controller.ts | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) 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();