@ozdao/prometheus-framework 0.2.14 → 0.2.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -381,7 +381,6 @@ const reactionControllerFactory = (db) => {
381
381
  const Reaction = db.reaction;
382
382
  const read = async (req, res) => {
383
383
  let query = {};
384
- let options = {};
385
384
  if (req.query.user) {
386
385
  query.user = new ObjectId(req.query.user);
387
386
  }
@@ -394,9 +393,8 @@ const reactionControllerFactory = (db) => {
394
393
  if (req.query.targetString) {
395
394
  query.targetString = req.query.targetString;
396
395
  }
397
- console.log(query);
398
396
  try {
399
- const reactions = await Reaction.find(query, null, options).populate("user");
397
+ const reactions = await Reaction.find(query).populate("user");
400
398
  if (!reactions) {
401
399
  return res.status(404).send({ errorCode: "REACTIONS_NOT_FOUND" });
402
400
  }
@@ -380,7 +380,6 @@ const reactionControllerFactory = (db) => {
380
380
  const Reaction = db.reaction;
381
381
  const read = async (req, res) => {
382
382
  let query = {};
383
- let options = {};
384
383
  if (req.query.user) {
385
384
  query.user = new ObjectId(req.query.user);
386
385
  }
@@ -393,9 +392,8 @@ const reactionControllerFactory = (db) => {
393
392
  if (req.query.targetString) {
394
393
  query.targetString = req.query.targetString;
395
394
  }
396
- console.log(query);
397
395
  try {
398
- const reactions = await Reaction.find(query, null, options).populate("user");
396
+ const reactions = await Reaction.find(query).populate("user");
399
397
  if (!reactions) {
400
398
  return res.status(404).send({ errorCode: "REACTIONS_NOT_FOUND" });
401
399
  }