Skip to content

Commit

Permalink
ts changes
Browse files Browse the repository at this point in the history
  • Loading branch information
d-leeee committed Sep 23, 2024
1 parent a574146 commit 4526b6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/utils/connectDB.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { MongoClient, ServerApiVersion } from "mongodb";
import error from "next/error";

type connectionType = {
isConnected?: boolean;
Expand Down Expand Up @@ -28,7 +27,7 @@ const connectDB = async () => {

return client;
} catch (err) {
console.error("Error connecting to MongoDB:", error);
console.error("Error connecting to MongoDB:", err);
throw new Error("MongoDB connection failed");
}
};
Expand Down

0 comments on commit 4526b6d

Please sign in to comment.