Skip to content

Commit

Permalink
chore: add authSource in mongoose connection
Browse files Browse the repository at this point in the history
  • Loading branch information
luoingly committed Feb 25, 2025
1 parent d43c17d commit 7095fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mongoose.set('strictQuery', true)
mongoose.Promise = globalThis.Promise

// 连接MongoDB数据库
mongoose.connect(config.dbURL)
mongoose.connect(config.dbURL, { authSource: 'admin' })

mongoose.Promise = globalThis.Promise

Expand Down

0 comments on commit 7095fbc

Please sign in to comment.