Guest User

Untitled

a guest
Jul 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. app.get("/logs", (req, res) => {
  2. Log.find({}, (err, logs) => {
  3. if(err){
  4. console.log("ERROR!" + err );
  5. } else {
  6. res.render("index", {logs: logs});
  7. }
  8. });
  9. });
  10.  
  11. app.get("/logs", (req, res) => {
  12. DailyTask.find(
  13. {"created_on":{"$gte":startOfToday, "$lt": now}},(err, tasks) =>{
  14. if(err){
  15. console.log("ERROR => " + err);
  16. } else {
  17. res.render("index", {tasks: tasks});
  18. }
  19. });
  20. });
Add Comment
Please, Sign In to add comment