@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.
- package/dist/community.server.js +1 -3
- package/dist/community.server.mjs +1 -3
- package/dist/main.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/community/controllers/reactions.controller.js +27 -27
- package/src/modules/globals/router/routerGuards.js +1 -1
- package/src/styles/config.scss +9 -7
package/dist/community.server.js
CHANGED
@@ -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
|
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
|
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
|
}
|