@doctadevs/knex
Advanced tools
Comparing version 0.0.39 to 0.0.40
@@ -13,2 +13,3 @@ import db from './database'; | ||
export { default as asIdentificationType } from './transforms/identification-type'; | ||
export { default as asPaymentMethod } from './transforms/payment-method'; | ||
export * from './services/discounts'; | ||
@@ -15,0 +16,0 @@ export * from './services/prices'; |
@@ -16,3 +16,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.asIdentificationType = exports.asPronoun = exports.asGender = exports.asTrainingCohortSchedule = exports.asEnrollment = exports.asTrainingCohortQuota = exports.asTraining = exports.asStudent = exports.asPrice = exports.asDiscount = exports.asDiscountRule = void 0; | ||
exports.asPaymentMethod = exports.asIdentificationType = exports.asPronoun = exports.asGender = exports.asTrainingCohortSchedule = exports.asEnrollment = exports.asTrainingCohortQuota = exports.asTraining = exports.asStudent = exports.asPrice = exports.asDiscount = exports.asDiscountRule = void 0; | ||
const database_1 = __importDefault(require("./database")); | ||
@@ -41,2 +41,4 @@ var discount_rule_1 = require("./transforms/discount-rule"); | ||
Object.defineProperty(exports, "asIdentificationType", { enumerable: true, get: function () { return __importDefault(identification_type_1).default; } }); | ||
var payment_method_1 = require("./transforms/payment-method"); | ||
Object.defineProperty(exports, "asPaymentMethod", { enumerable: true, get: function () { return __importDefault(payment_method_1).default; } }); | ||
__exportStar(require("./services/discounts"), exports); | ||
@@ -43,0 +45,0 @@ __exportStar(require("./services/prices"), exports); |
@@ -8,2 +8,3 @@ "use strict"; | ||
const database_1 = __importDefault(require("../database")); | ||
const payment_method_1 = __importDefault(require("../transforms/payment-method")); | ||
const paymentMethods = () => database_1.default('payment_methods'); | ||
@@ -15,3 +16,3 @@ const getPaymentMethodById = async (id) => { | ||
} | ||
return paymentMethod; | ||
return payment_method_1.default(paymentMethod); | ||
}; | ||
@@ -21,5 +22,5 @@ exports.getPaymentMethodById = getPaymentMethodById; | ||
const paymentMethodsList = await paymentMethods().select(); | ||
return paymentMethodsList; | ||
return paymentMethodsList.map(payment_method_1.default); | ||
}; | ||
exports.getPaymentMethods = getPaymentMethods; | ||
//# sourceMappingURL=payment-methods.js.map |
@@ -14,2 +14,3 @@ import db from './database'; | ||
export { default as asIdentificationType } from './transforms/identification-type'; | ||
export { default as asPaymentMethod } from './transforms/payment-method'; | ||
@@ -16,0 +17,0 @@ export * from './services/discounts'; |
{ | ||
"name": "@doctadevs/knex", | ||
"version": "0.0.39", | ||
"version": "0.0.40", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
import { PaymentMethod } from '@doctadevs/types'; | ||
import db from '../database'; | ||
import asPaymentMethod from '../transforms/payment-method'; | ||
const paymentMethods = () => db('payment_methods'); | ||
@@ -13,3 +15,3 @@ | ||
return paymentMethod as PaymentMethod; | ||
return asPaymentMethod(paymentMethod); | ||
}; | ||
@@ -20,3 +22,3 @@ | ||
return paymentMethodsList as PaymentMethod[]; | ||
return paymentMethodsList.map(asPaymentMethod); | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83227
107
1522