fix
continuous-integration/drone/push Build is failing Details

main
rustdreamer 3 years ago
parent 685469b6df
commit 07a53b7b02

@ -49,7 +49,7 @@ steps:
# build # build
- name: build - name: build
pull: if-not-exists pull: if-not-exists
image: node:16.14.0 image: node:14.16.1
commands: commands:
- npm run build - npm run build
when: when:

@ -165,15 +165,15 @@ export class AppController {
@Post("/visitor") @Post("/visitor")
async create(@Body() data: CreateVisitor) { async create(@Body() data: CreateVisitor) {
if (new Date(data.apply_date).toString() == "Invalid Date") { // if (new Date(data.apply_date).toString() == "Invalid Date") {
throw new BadRequestException("apply_date 格式不正确") // throw new BadRequestException("apply_date 格式不正确")
} // }
if (new Date(data.start_date).toString() == "Invalid Date") { // if (new Date(data.start_date).toString() == "Invalid Date") {
throw new BadRequestException("start_date 格式不正确") // throw new BadRequestException("start_date 格式不正确")
} // }
if (new Date(data.end_date).toString() == "Invalid Date") { // if (new Date(data.end_date).toString() == "Invalid Date") {
throw new BadRequestException("end_date 格式不正确") // throw new BadRequestException("end_date 格式不正确")
} // }
return await this.dataSource.transaction(async transactionalEntityManager => { return await this.dataSource.transaction(async transactionalEntityManager => {
const new_node_visitor = new NodeVisitorEntity(); const new_node_visitor = new NodeVisitorEntity();

Loading…
Cancel
Save