Skip to content

Commit

Permalink
fixed issue with submitted date
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonSharratt committed Jan 15, 2020
1 parent fbae62a commit 8c7eea5
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions microservices/requestApi/routes/v2/db/model/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ model.getAll = function(query, limit, page, user, callback){

var zoneRestrict = model.getZoneRestrict(user);

logger.verbose("v2 zone restrict", zoneRestrict.$match.$or);

logger.verbose("v2 getAll ", user.supervisor, user.outputchecker);

var queryRequests = function(err, topicR, projectR){
logger.verbose("V2 get all topics model get all", topicR);

db.Request.aggregate([
var agg = [
{
$match: {
topic: {$in: topicR}
Expand Down Expand Up @@ -158,7 +159,7 @@ model.getAll = function(query, limit, page, user, callback){
$filter: {
input: "$chronology",
as: "chrono",
cond: { $eq: [ "$$chrono.enteredState", this.AWAITING_REVIEW_STATE] }
cond: { $eq: [ "$$chrono.enteredState", baseModel.AWAITING_REVIEW_STATE] }
}
},
as: "ele",
Expand All @@ -179,7 +180,11 @@ model.getAll = function(query, limit, page, user, callback){
{
$limit: limit
}
]).exec(function(err, results){
];

logger.verbose("v2 model agg", agg);

db.Request.aggregate(agg).exec(function(err, results){
logger.verbose('v2 finished db call', err, results);
var processed = 0;
if (results){
Expand Down

0 comments on commit 8c7eea5

Please sign in to comment.