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

main
rustdreamer 3 years ago
parent 685469b6df
commit 07a53b7b02

@ -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:

@ -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();

Loading…
Cancel
Save