This commit is contained in:
Henrique Dias
2017-01-03 21:21:40 +00:00
parent af8dbc2180
commit b192da1982
5 changed files with 167 additions and 141 deletions

View File

@@ -5,6 +5,7 @@ import (
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"os/exec"
"path/filepath"
@@ -94,6 +95,8 @@ func parse(c *caddy.Controller, root string) (*Config, *filemanager.FileManager,
cfg.Public = strings.Replace(root, "./", "", -1)
cfg.BaseURL = "/admin"
cfg.Root = "./"
cfg.BeforePublish = func(r *http.Request, c *config.Config, u *config.User) error { return nil }
cfg.AfterPublish = func(r *http.Request, c *config.Config, u *config.User) error { return nil }
args := c.RemainingArgs()