This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Tour = require('../models/tour.model.js'); | |
exports.searchPackages = async (req, res)=>{ | |
const searchParams = req.query; | |
const kids= searchParams.kids || "2"; | |
const solo =searchParams.solo || "2"; | |
let startTime = searchParams.startTime || 0; | |
let endTime = searchParams.endTime || 0; | |
let day = (endTime - startTime) / (24*3600*1000) - 1; // divide by one day in seconds |