refactor: moving repository

* refactor

* updates

* add circle

* update circle

* fix circle
This commit is contained in:
Henrique Dias
2018-02-01 13:38:43 +00:00
committed by GitHub
parent d97f17facb
commit 613a3f2811
153 changed files with 97 additions and 9811 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
)
const reCaptchaAPI = "https://www.google.com/recaptcha/api/siteverify"

View File

@@ -1,3 +1,4 @@
package http
import (
@@ -7,7 +8,7 @@ import (
"path/filepath"
"strings"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
"github.com/hacdias/fileutils"
"github.com/mholt/archiver"
)

View File

@@ -10,14 +10,14 @@ import (
"strings"
"time"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
)
// Handler returns a function compatible with http.HandleFunc.
func Handler(m *fm.FileManager) http.Handler {
func Handler(m *fm.FileBrowser) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
code, err := serve(&fm.Context{
FileManager: m,
FileBrowser: m,
User: nil,
File: nil,
}, w, r)
@@ -139,7 +139,7 @@ func apiHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, err
if c.Router == "checksum" || c.Router == "download" {
var err error
c.File, err = fm.GetInfo(r.URL, c.FileManager, c.User)
c.File, err = fm.GetInfo(r.URL, c.FileBrowser, c.User)
if err != nil {
return ErrorToHTTP(err, false), err
}

View File

@@ -13,7 +13,7 @@ import (
"strings"
"time"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
"github.com/hacdias/fileutils"
)
@@ -64,7 +64,7 @@ func resourceHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int
func resourceGetHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {
// Gets the information of the directory/file.
f, err := fm.GetInfo(r.URL, c.FileManager, c.User)
f, err := fm.GetInfo(r.URL, c.FileBrowser, c.User)
if err != nil {
return ErrorToHTTP(err, false), err
}

View File

@@ -6,7 +6,7 @@ import (
"net/http"
"reflect"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
"github.com/mitchellh/mapstructure"
)

View File

@@ -8,7 +8,7 @@ import (
"strings"
"time"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
)
func shareHandler(c *fm.Context, w http.ResponseWriter, r *http.Request) (int, error) {

View File

@@ -9,7 +9,7 @@ import (
"strconv"
"strings"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
)
type modifyRequest struct {

View File

@@ -13,7 +13,7 @@ import (
"time"
"github.com/gorilla/websocket"
fm "github.com/hacdias/filemanager"
fm "github.com/filebrowser/filebrowser"
)
var upgrader = websocket.Upgrader{