mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix(InventoryValuation): inventory valuation report.
This commit is contained in:
@@ -43,13 +43,6 @@ export default class ExchangeRatesController extends BaseController {
|
||||
asyncMiddleware(this.editExchangeRate.bind(this)),
|
||||
this.handleServiceError
|
||||
);
|
||||
router.delete(
|
||||
'/bulk',
|
||||
[...this.exchangeRatesIdsSchema],
|
||||
this.validationResult,
|
||||
asyncMiddleware(this.bulkDeleteExchangeRates.bind(this)),
|
||||
this.handleServiceError
|
||||
);
|
||||
router.delete(
|
||||
'/:id',
|
||||
[...this.exchangeRateIdSchema],
|
||||
@@ -192,31 +185,6 @@ export default class ExchangeRatesController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes the given exchange rates in bulk.
|
||||
* @param {Request} req
|
||||
* @param {Response} res
|
||||
* @param {NextFunction} next
|
||||
*/
|
||||
async bulkDeleteExchangeRates(
|
||||
req: Request,
|
||||
res: Response,
|
||||
next: NextFunction
|
||||
) {
|
||||
const { tenantId } = req;
|
||||
const { ids: exchangeRateIds } = req.query;
|
||||
|
||||
try {
|
||||
await this.exchangeRatesService.deleteBulkExchangeRates(
|
||||
tenantId,
|
||||
exchangeRateIds
|
||||
);
|
||||
return res.status(200).send();
|
||||
} catch (error) {
|
||||
next(error);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle service errors.
|
||||
* @param {Error} error
|
||||
|
||||
Reference in New Issue
Block a user