mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 04:40:32 +00:00
wip
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
ApiExtraModels,
|
||||
ApiOperation,
|
||||
ApiQuery,
|
||||
ApiResponse,
|
||||
ApiTags,
|
||||
getSchemaPath,
|
||||
@@ -14,12 +13,10 @@ import {
|
||||
Headers,
|
||||
HttpCode,
|
||||
Param,
|
||||
ParseBoolPipe,
|
||||
ParseIntPipe,
|
||||
Post,
|
||||
Put,
|
||||
Query,
|
||||
DefaultValuePipe,
|
||||
} from '@nestjs/common';
|
||||
import { PaymentReceivesApplication } from './PaymentReceived.application';
|
||||
import {
|
||||
@@ -174,25 +171,16 @@ export class PaymentReceivesController {
|
||||
|
||||
@Post('bulk-delete')
|
||||
@ApiOperation({ summary: 'Deletes multiple payments received.' })
|
||||
@ApiQuery({
|
||||
name: 'skip_undeletable',
|
||||
required: false,
|
||||
type: Boolean,
|
||||
description:
|
||||
'When true, undeletable payments will be skipped and only deletable ones will be removed.',
|
||||
})
|
||||
@ApiResponse({
|
||||
status: 200,
|
||||
description: 'Payments received deleted successfully.',
|
||||
})
|
||||
public bulkDeletePaymentsReceived(
|
||||
@Body() bulkDeleteDto: BulkDeleteDto,
|
||||
@Query('skip_undeletable', new DefaultValuePipe(false), ParseBoolPipe)
|
||||
skipUndeletable: boolean,
|
||||
) {
|
||||
return this.paymentReceivesApplication.bulkDeletePaymentReceives(
|
||||
bulkDeleteDto.ids,
|
||||
{ skipUndeletable },
|
||||
{ skipUndeletable: bulkDeleteDto.skipUndeletable ?? false },
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user