Skip to content

Commit

Permalink
some modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
Inayatkhan9909 committed Aug 20, 2024
1 parent ba31e18 commit c25a48f
Show file tree
Hide file tree
Showing 9 changed files with 263 additions and 95 deletions.
4 changes: 2 additions & 2 deletions Models/BookPackageModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ const BookPackageSchema = new mongoose.Schema({
trim: true
},
pickuptime: {
type: Number,
type: String,
required: [true, "Pickup time is required"],
trim: true
},
pickupdate: {
type: Number,
type: Date,
required: [true, "Pickup date is required"],
trim: true
},
Expand Down
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@mui/material": "^5.15.19",
"@nextui-org/react": "^2.4.6",
"@reduxjs/toolkit": "^2.2.6",
"axios": "^1.7.4",
"bcrypt": "^5.1.1",
"cloudinary": "^2.4.0",
"cookie": "^0.6.0",
Expand Down
1 change: 0 additions & 1 deletion pages/api/cab/BookcabPD.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const Bookcab = async (req, res) => {
const { pickup, drop, triptype, email, traveldate,
traveltime, cabtype, persons, customername, contact, pickupfulladdress } = req.body;
const tripfair = req.body.price;

if (!pickup || !drop || !triptype || !email || !traveldate || !traveltime ||
!tripfair || !cabtype || !persons || !customername || !contact || !pickupfulladdress) {
return errorHandler(res, 400, "All fields are required");
Expand Down
2 changes: 1 addition & 1 deletion pages/api/cab/packages/BookPackage.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const BookPackage = async (req, res) => {
}

const { packagename, pickup, customername, email, pickupfulladdress, contact, price, persons, packageduration, pickuptime, pickupdate } = req.body;

console.log(req.body)
if (!packagename || !pickup || !customername || !email || !pickupfulladdress || !contact || !price || !persons || !packageduration || !pickuptime || !pickupdate) {
return errorHandler(res, 400, "All fields are required");
}
Expand Down
Loading

0 comments on commit c25a48f

Please sign in to comment.