Commit 6f131efd authored by nanahira's avatar nanahira

bump versions and fix

parent 965ae4bb
......@@ -37,7 +37,7 @@
"@nestjs/swagger": "^6.0.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"typeorm": "^0.3.7"
"typeorm": "^0.3.10"
}
},
"node_modules/@ampproject/remapping": {
......@@ -6267,9 +6267,9 @@
"devOptional": true
},
"node_modules/typeorm": {
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.7.tgz",
"integrity": "sha512-MsPJeP6Zuwfe64c++l80+VRqpGEGxf0CkztIEnehQ+CMmQPSHjOnFbFxwBuZ2jiLqZTjLk2ZqQdVF0RmvxNF3Q==",
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.10.tgz",
"integrity": "sha512-VMKiM84EpJQ+Mz9xDIPqnfplWhyUy1d8ccaKdMY9obifxJOTFnv8GYVyPsGwG8Lk7Nb8MlttHyHWENGAhBA3WA==",
"peer": true,
"dependencies": {
"@sqltools/formatter": "^1.2.2",
......@@ -11336,9 +11336,9 @@
"devOptional": true
},
"typeorm": {
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.7.tgz",
"integrity": "sha512-MsPJeP6Zuwfe64c++l80+VRqpGEGxf0CkztIEnehQ+CMmQPSHjOnFbFxwBuZ2jiLqZTjLk2ZqQdVF0RmvxNF3Q==",
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/typeorm/-/typeorm-0.3.10.tgz",
"integrity": "sha512-VMKiM84EpJQ+Mz9xDIPqnfplWhyUy1d8ccaKdMY9obifxJOTFnv8GYVyPsGwG8Lk7Nb8MlttHyHWENGAhBA3WA==",
"peer": true,
"requires": {
"@sqltools/formatter": "^1.2.2",
......
......@@ -64,7 +64,7 @@
"@nestjs/swagger": "^6.0.4",
"class-transformer": "^0.5.1",
"class-validator": "^0.13.2",
"typeorm": "^0.3.7"
"typeorm": "^0.3.10"
},
"dependencies": {
"lodash": "^4.17.21"
......
......@@ -173,6 +173,7 @@ export class CrudBase<T extends ValidCrudEntity<T>> {
try {
const savedEnt = await repo.save(ent as DeepPartial<T>);
await savedEnt.afterCreate();
return savedEnt;
} catch (e) {
this.log.error(
`Failed to create entity ${JSON.stringify(ent)}: ${e.toString()}`,
......
......@@ -158,12 +158,15 @@ export const EnumColumn = <T>(
]);
};
export const BoolColumn = (options: PropertyOptions<boolean> = {}): PropertyDecorator => MergePropertyDecorators([
Index(),
Column('boolean', columnDecoratorOptions(options)),
validatorDecorator(options),
swaggerDecorator(options, { type: Boolean }),
])
export const BoolColumn = (
options: PropertyOptions<boolean> = {},
): PropertyDecorator =>
MergePropertyDecorators([
Index(),
Column('boolean', columnDecoratorOptions(options)),
validatorDecorator(options),
swaggerDecorator(options, { type: Boolean }),
]);
export const NotColumn = (
options: OpenAPIOptions<any> = {},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment