Commit 6c6e16ef authored by nanahira's avatar nanahira

204

parent 274a3303
Pipeline #7305 passed with stages
in 1 minute and 50 seconds
...@@ -127,7 +127,7 @@ export class CrudBase< ...@@ -127,7 +127,7 @@ export class CrudBase<
} }
async findAll( async findAll(
ent?: Partial<T>, ent?: T,
extraQuery: (qb: SelectQueryBuilder<T>) => void = () => {}, extraQuery: (qb: SelectQueryBuilder<T>) => void = () => {},
) { ) {
const query = this.queryBuilder(); const query = this.queryBuilder();
...@@ -199,6 +199,6 @@ export class CrudBase< ...@@ -199,6 +199,6 @@ export class CrudBase<
if (!result.affected) { if (!result.affected) {
throw new BlankReturnMessageDto(404, `ID ${id} not found.`).toException(); throw new BlankReturnMessageDto(404, `ID ${id} not found.`).toException();
} }
return new BlankReturnMessageDto(200, 'success'); return new BlankReturnMessageDto(204, 'success');
} }
} }
...@@ -111,5 +111,11 @@ export const EnumColumn = <T>( ...@@ -111,5 +111,11 @@ export const EnumColumn = <T>(
IsEnum(targetEnum), IsEnum(targetEnum),
]); ]);
export const NotColumn = (): PropertyDecorator => export const NotColumn = (
MergePropertyDecorators([Exclude(), ApiProperty({ required: false })]); description?: string,
swaggerExtras: ApiPropertyOptions = {},
): PropertyDecorator =>
MergePropertyDecorators([
Exclude(),
ApiProperty({ description, required: false, ...swaggerExtras }),
]);
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