"use strict";

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

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

const webhookCustomerRedact = async (req, res, config) => (0, _utils.handler)(_utils.verifyWebhook, async data => {
  const shop = data.get("x-shopify-shop-domain"); // const customer: any = data.body.customer

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

exports.webhookCustomerRedact = webhookCustomerRedact;
//# sourceMappingURL=customer-redact.js.map