billing - detach PM with operation result
MODIFY
src/server/rest/v1/service/BillingService.ts
src/server/rest/v1/service/BillingService.ts
@@ -23,7 +23,6 @@ import TenantComponents from '../../../../types/TenantComponents';
import User from '../../../../types/User';
import UserStorage from '../../../../storage/mongodb/UserStorage';
import UtilsService from './UtilsService';
-import fs from 'fs';
const MODULE_NAME = 'BillingService';
@@ -625,7 +624,7 @@ export default class BillingService {
UtilsService.assertObjectExists(action, user, `User ID '${userID}' does not exist`,
MODULE_NAME, 'handleBillingDeletePaymentMethod', req.user);
// Invoke the billing implementation
- await billingImpl.deletePaymentMethod(user, filteredRequest.paymentMethodId);
+ const operationResult: BillingOperationResult = await billingImpl.deletePaymentMethod(user, filteredRequest.paymentMethodId);
// Log
await Logging.logSecurityInfo({
tenantID: req.user.tenantID,
@@ -634,7 +633,7 @@ export default class BillingService {
action: action
});
// Ok
- res.json(Constants.REST_RESPONSE_SUCCESS);
+ res.json(operationResult);
next();
}

billing - detach PM with operation result