0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-23 23:58:13 +00:00

Update Mongoose calls to not use callbacks.

This commit is contained in:
Trevor Buckner
2023-03-21 16:06:43 -04:00
parent 9dda58991f
commit 1ec08bb1fa
2 changed files with 18 additions and 24 deletions

View File

@@ -27,8 +27,8 @@ const disconnect = async ()=>{
};
const connect = async (config)=>{
return await Mongoose.connect(getMongoDBURL(config),
{ retryWrites: false }, handleConnectionError);
return await Mongoose.connect(getMongoDBURL(config), { retryWrites: false })
.catch(error=>handleConnectionError(error));
};
module.exports = {