@vymalo/medusa-printful
Version:
Connect your MedusaJS store to Printful
25 lines • 799 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.POST = void 0;
const utils_1 = require("@medusajs/utils");
const POST = async (req, res) => {
const logger = req.scope.resolve(utils_1.ContainerRegistrationKeys.LOGGER);
const eventBusService = req.scope.resolve(utils_1.Modules.EVENT_BUS);
try {
await eventBusService.emit({
name: 'printful.meta.sync_products',
data: {},
});
res.json({
ok: true,
});
}
catch (error) {
logger.error('Error occurred while launching the Sync event', error);
res
.status(500)
.send({ error: 'Error occurred while launching the Sync event' });
}
};
exports.POST = POST;
//# sourceMappingURL=route.js.map