@vendure/core
Version:
A modern, headless ecommerce framework
40 lines • 2.31 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
return function (target, key) { decorator(target, key, paramIndex); }
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShopShippingMethodsResolver = void 0;
const graphql_1 = require("@nestjs/graphql");
const shipping_method_service_1 = require("../../../service/services/shipping-method.service");
const request_context_1 = require("../../common/request-context");
const request_context_decorator_1 = require("../../decorators/request-context.decorator");
let ShopShippingMethodsResolver = class ShopShippingMethodsResolver {
constructor(shippingMethodService) {
this.shippingMethodService = shippingMethodService;
}
async activeShippingMethods(ctx) {
return this.shippingMethodService.getActiveShippingMethods(ctx);
}
};
exports.ShopShippingMethodsResolver = ShopShippingMethodsResolver;
__decorate([
(0, graphql_1.Query)(),
__param(0, (0, request_context_decorator_1.Ctx)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [request_context_1.RequestContext]),
__metadata("design:returntype", Promise)
], ShopShippingMethodsResolver.prototype, "activeShippingMethods", null);
exports.ShopShippingMethodsResolver = ShopShippingMethodsResolver = __decorate([
(0, graphql_1.Resolver)(),
__metadata("design:paramtypes", [shipping_method_service_1.ShippingMethodService])
], ShopShippingMethodsResolver);
//# sourceMappingURL=shop-shipping-methods.resolver.js.map