src/controllers/requestController.js
/**
 * @description This methods helps users get info of most travelled destinations
 * @param  {object} req - The request object
 * @param  {object} res - The response object
 * @returns  {object} The response object
 */
@description This methods helps users get info of most travelled destinations
@param  {object} req - The request object
@param  {object} res - The response object
@returns  {object} The response object
@description This methods helps users get info of most travelled destinations @param { object } req - The request object @param { object } res - The response object @returns { object } The response object
static async MostTravelledDestination(req, res) {
    const Destinations = await DestinationService.FetchAllDestinations();
    const Requests = await DestinationService.AllRequests();
    return res.status(200).json({
      status: 200,
      message: 'Destinations info',
      Requaests: `Total trip requests are ${Requests} requests`,
      most_travelled_destinations: Destinations,
      data: {
        Requests: `Total trip requests are ${Requests} requests`,
        Destinations
      }
    });
  }
static async MostTravelledDestination ( req , res ) { const Destinations = await DestinationService . FetchAllDestinations ( ) ; const Requests = await DestinationService . AllRequests ( ) ; return res . status ( 200 ) . json ( { status : 200 , message : 'Destinations info' , Requaests : ` ${ Requests } ` , most_travelled_destinations : Destinations , data : { Requests : ` ${ Requests } ` , Destinations } } ) ; }
@description This methods helps users get info of most travelled destinations
 @param  {object} req - The request object
 @param  {object} res - The response object
 @returns  {object} The response object
@description This methods helps users get info of most travelled destinations @param { object } req - The request object @param { object } res - The response object @returns { object } The response object