uaDevice = (req) => {
  const uaParser = new UAParser(req.headers["user-agent"]);
  const device = uaParser.getDevice();
  if (!device.type) return "web";
  else return device.type;
}
internal helper to get the device type from user agent
@param {any} req
@returns device type as string