Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Nov 18, 2023
1 parent 5aa0d91 commit f7af486
Show file tree
Hide file tree
Showing 12 changed files with 864 additions and 830 deletions.
787 changes: 404 additions & 383 deletions api/package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": "^8.52.0",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"eslint": "^8.54.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.29.0",
"nodemon": "^3.0.1",
Expand All @@ -26,18 +26,18 @@
},
"dependencies": {
"@babel/cli": "^7.23.0",
"@babel/preset-env": "^7.23.2",
"@types/bcrypt": "^5.0.1",
"@types/compression": "^1.7.4",
"@types/cookie-parser": "^1.4.5",
"@types/cors": "^2.8.15",
"@types/express": "^4.17.20",
"@types/jsonwebtoken": "^9.0.4",
"@types/multer": "^1.4.9",
"@types/node": "^20.8.10",
"@types/nodemailer": "^6.4.13",
"@types/uuid": "^9.0.6",
"@types/validator": "^13.11.5",
"@babel/preset-env": "^7.23.3",
"@types/bcrypt": "^5.0.2",
"@types/compression": "^1.7.5",
"@types/cookie-parser": "^1.4.6",
"@types/cors": "^2.8.16",
"@types/express": "^4.17.21",
"@types/jsonwebtoken": "^9.0.5",
"@types/multer": "^1.4.10",
"@types/node": "^20.9.1",
"@types/nodemailer": "^6.4.14",
"@types/uuid": "^9.0.7",
"@types/validator": "^13.11.6",
"babel-plugin-add-import-extension": "^1.6.0",
"bcrypt": "^5.1.1",
"compression": "^1.7.4",
Expand All @@ -47,10 +47,10 @@
"escape-string-regexp": "^5.0.0",
"expo-server-sdk": "^3.7.0",
"express": "^4.18.2",
"helmet": "^7.0.0",
"helmet": "^7.1.0",
"jsonwebtoken": "^9.0.2",
"localized-strings": "^0.2.4",
"mongoose": "^8.0.0",
"mongoose": "^8.0.1",
"movinin-helper": "file:../packages/movinin-helper",
"movinin-types": "file:../packages/movinin-types",
"multer": "^1.4.5-lts.1",
Expand Down
9 changes: 5 additions & 4 deletions api/src/controllers/bookingController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,11 +679,12 @@ export async function hasBookings(req: Request, res: Response) {
const { renter } = req.params

try {
const count = await Booking.find({
renter: new mongoose.Types.ObjectId(renter),
})
const count = await Booking
.find({
renter: new mongoose.Types.ObjectId(renter),
})
.limit(1)
.count()
.countDocuments()

if (count === 1) {
return res.sendStatus(200)
Expand Down
5 changes: 4 additions & 1 deletion api/src/controllers/locationController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,10 @@ export async function checkLocation(req: Request, res: Response) {
try {
const _id = new mongoose.Types.ObjectId(id)

const count = await Property.find({ location: _id }).limit(1).count()
const count = await Property
.find({ location: _id })
.limit(1)
.countDocuments()

if (count === 1) {
return res.sendStatus(200)
Expand Down
5 changes: 4 additions & 1 deletion api/src/controllers/notificationController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ export async function deleteNotifications(req: Request, res: Response) {
const { userId: _userId } = req.params
const userId = new mongoose.Types.ObjectId(_userId)

const count = await Notification.find({ _id: { $in: ids }, isRead: false }).count()
const count = await Notification
.find({ _id: { $in: ids }, isRead: false })
.countDocuments()

await Notification.deleteMany({ _id: { $in: ids } })

const counter = await NotificationCounter.findOne({ user: userId })
Expand Down
5 changes: 4 additions & 1 deletion api/src/controllers/propertyController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ export async function checkProperty(req: Request, res: Response) {

try {
const _id = new mongoose.Types.ObjectId(id)
const count = await Booking.find({ property: _id }).limit(1).count()
const count = await Booking
.find({ property: _id })
.limit(1)
.countDocuments()

if (count === 1) {
return res.sendStatus(200)
Expand Down
Loading

0 comments on commit f7af486

Please sign in to comment.