update commandrunner func name
parent
9f51b1fcb4
commit
1354878838
|
@ -86,11 +86,11 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
|
||||||
for c.NextBlock() {
|
for c.NextBlock() {
|
||||||
switch c.Val() {
|
switch c.Val() {
|
||||||
case "before_save":
|
case "before_save":
|
||||||
if m.BeforeSave, err = CommandRunner(c); err != nil {
|
if m.BeforeSave, err = makeCommand(c); err != nil {
|
||||||
return configs, err
|
return configs, err
|
||||||
}
|
}
|
||||||
case "after_save":
|
case "after_save":
|
||||||
if m.AfterSave, err = CommandRunner(c); err != nil {
|
if m.AfterSave, err = makeCommand(c); err != nil {
|
||||||
return configs, err
|
return configs, err
|
||||||
}
|
}
|
||||||
case "webdav":
|
case "webdav":
|
||||||
|
@ -211,8 +211,7 @@ func parse(c *caddy.Controller) ([]*filemanager.FileManager, error) {
|
||||||
return configs, nil
|
return configs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// CommandRunner ...
|
func makeCommand(c *caddy.Controller) (filemanager.Command, error) {
|
||||||
func CommandRunner(c *caddy.Controller) (filemanager.Command, error) {
|
|
||||||
fn := func(r *http.Request, c *filemanager.FileManager, u *filemanager.User) error { return nil }
|
fn := func(r *http.Request, c *filemanager.FileManager, u *filemanager.User) error { return nil }
|
||||||
|
|
||||||
args := c.RemainingArgs()
|
args := c.RemainingArgs()
|
||||||
|
|
Loading…
Reference in New Issue