Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Commit b712b8e

Browse files
committed
API: Remove legacy connection options.
These have been removed from mongoose and were causing deployment errors (email spam).
1 parent 1d7d551 commit b712b8e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/hoc/withConnect.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import mongoose from 'mongoose';
22

33
const withConnect = (handler) => async (req, res) => {
44
if (!mongoose.connection.readyState) {
5-
mongoose.connect(process.env.MONGODB as string, {
6-
useFindAndModify: false,
7-
useCreateIndex: true
8-
});
5+
mongoose.connect(process.env.MONGODB as string);
96
}
107

118
return handler(req, res);

0 commit comments

Comments
 (0)