Skip to content

Commit

Permalink
Merge pull request #39 from ych411521894/master
Browse files Browse the repository at this point in the history
1.修改mongo指定数据库,未创建指定数据库,认证失败。
  • Loading branch information
huahua132 authored Oct 9, 2024
2 parents f6e1889 + b20bd72 commit 3133408
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lualib/skynet-fly/db/mongof.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ function M.new_client(db_name)
assert(conf_map and conf_map[db_name],"not mongo conf")

local conf = conf_map[db_name]

local authdb = conf.authdb
conf.authdb = nil
local c = mongo.client(conf)
local db = c[conf.authdb]
local db = c[authdb]
return db
end

Expand Down

0 comments on commit 3133408

Please sign in to comment.