Rename manager to browser (#406)

* rename File Manager to File Browser

* rename fm to fb
This commit is contained in:
1138-4EB
2018-04-23 23:42:52 +02:00
committed by Henrique Dias
parent cd0ab77388
commit 7643b0c4e3
16 changed files with 225 additions and 225 deletions

View File

@@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"
fm "github.com/filebrowser/filebrowser"
fb "github.com/filebrowser/filebrowser"
"github.com/hacdias/varutils"
)
@@ -64,7 +64,7 @@ func (h Hugo) Name() string {
}
// Hook is the pre-api handler.
func (h Hugo) Hook(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
func (h Hugo) Hook(c *fb.Context, w http.ResponseWriter, r *http.Request) (int, error) {
// If we are not using HTTP Post, we shall return Method Not Allowed
// since we are only working with this method.
if r.Method != http.MethodPost {
@@ -108,7 +108,7 @@ func (h Hugo) Hook(c *fm.Context, w http.ResponseWriter, r *http.Request) (int,
}
// Publish publishes a post.
func (h Hugo) Publish(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
func (h Hugo) Publish(c *fb.Context, w http.ResponseWriter, r *http.Request) (int, error) {
filename := filepath.Join(c.User.Scope, r.URL.Path)
// We only run undraft command if it is a file.
@@ -125,7 +125,7 @@ func (h Hugo) Publish(c *fm.Context, w http.ResponseWriter, r *http.Request) (in
}
// Preview handles the preview path.
func (h *Hugo) Preview(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
func (h *Hugo) Preview(c *fb.Context, w http.ResponseWriter, r *http.Request) (int, error) {
// Get a new temporary path if there is none.
if h.previewPath == "" {
path, err := ioutil.TempDir("", "")