const path = require("path");
const logger = require("../utils/logger");

// Emit this to bodyshop room

exports.default = async (req, res) => {
  const { useremail, bodyshopid, operationName, variables, env, time, dbevent, user } = req.body;

  try {
    res.sendStatus(200);
  } catch {
    logger.log("ioevent-error", "silly", user, null, {
      operationname: operationName,
      time,
      dbevent,
      env,
      variables,
      bodyshopid,
      useremail
    });
    res.sendStatus(200);
  }
};
