"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.webhookShopRedact = void 0;

var _utils = require("../helpers/utils");

const webhookShopRedact = async (req, res, config) => (0, _utils.handler)(_utils.verifyWebhook, async data => {
  const shop = data.get("x-shopify-shop-domain");

  try {
    // TODO: Implement shop cleanup here
    console.log(`Shop redacted ${shop}`);
    res.status(200).json({
      status: "success",
      body: `Shop redacted ${shop}`
    });
  } catch (err) {
    console.log(err.message);
    res.status(200).json({
      status: "error",
      body: err.message
    });
  }
})(req, res, config);

exports.webhookShopRedact = webhookShopRedact;
//# sourceMappingURL=shop-redact.js.map