travomate / travomate-backend

this is the TravoMate App backend part
0 stars 0 forks source link

Endpoint for retrieving a single post #2

Open travomate opened 5 months ago

travomate commented 5 months ago

GET/posts/:id if a post is clicked it should be fetched

const Post= [
  {
    id: 1,
    createdAt: "20m",
    user: {
      id: 12,
      name: "Duke Fred",
      image: require('../../../../../assets/images/duke1.jpg'),
      oneKilo: 5.50,
      KilosRemaining: 15,
      gender: "Male",
      PreferredCurrency: "MAD",
      memberSince: "july 2023"

    },

    from: {
      country: "Morocco",
      city: "Casablanca",
      flag: require('../../../../../assets/images/Flag_of_Morocco.png')
    },
    to: {
      country: "Rwanda",
      city: "Kigali",
      flag: require('../../../../../assets/images/Flag_of_Rwanda.png')
    },
    departureDate: {
      day: 28,
      month: "May",
      year: 2023
    },
    ArrivalDate: {
      day: 29,
      month: "May",
      year: 2023
    }
  },
  ]