Skip to content

Commit

Permalink
username added on query
Browse files Browse the repository at this point in the history
  • Loading branch information
tareq89 committed Nov 6, 2016
1 parent 978dab9 commit af1cddf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions queryMaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ module.exports = {
$lt: new Date(params.query.enddate),
};
return dynObj;
} else if ((params.query.usertype === "USER" || params.query.usertype === "ENTERPRISE")
&& params.query.userid && params.query.userid.length === 24) {
} else if (params.query.username) {
return {
"User.UserId" : params.query.userid,
"User.UserName" : params.query.username,
"CreateTime" : {
$gte: new Date(params.query.startdate),
$lt: new Date(params.query.enddate),
Expand Down

0 comments on commit af1cddf

Please sign in to comment.