mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 05:37:34 +03:00
cmd/maddyctl: Fix imapsql module name mismatch
Forgotten after sql->imapsql rename.
This commit is contained in:
parent
393a2ec08d
commit
134342a366
2 changed files with 4 additions and 4 deletions
|
@ -619,7 +619,7 @@ func openStorage(ctx *cli.Context) (Storage, error) {
|
|||
|
||||
var store Storage
|
||||
switch node.Name {
|
||||
case "sql":
|
||||
case "imapsql":
|
||||
store, err = sqlFromCfgBlock(root, node)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -656,7 +656,7 @@ func openUserDB(ctx *cli.Context) (UserDB, error) {
|
|||
}
|
||||
|
||||
switch node.Name {
|
||||
case "sql":
|
||||
case "imapsql":
|
||||
return sqlFromCfgBlock(root, node)
|
||||
default:
|
||||
return nil, errors.New("Error: Authentication backend is not supported by maddyctl")
|
||||
|
|
|
@ -18,12 +18,12 @@ func sqlFromCfgBlock(root, node config.Node) (*imapsql.Storage, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
instName := "sql"
|
||||
instName := "imapsql"
|
||||
if len(node.Args) >= 1 {
|
||||
instName = node.Args[0]
|
||||
}
|
||||
|
||||
mod, err := imapsql.New("sql", instName, nil, nil)
|
||||
mod, err := imapsql.New("imapsql", instName, nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue