From 5f4a870de20dd8ebfbfe20b45807b1dff32fcd18 Mon Sep 17 00:00:00 2001 From: Pegasus Date: Mon, 21 Oct 2019 10:37:38 -0300 Subject: [PATCH] Reorganization of directory (Fix #30) --- webui/{ => backend}/auth/auth.go | 0 webui/{ => backend}/auth/authModel.go | 0 webui/{ => backend}/auth/database.go | 0 webui/{ => backend}/auth/errors.go | 0 webui/{ => backend}/auth/variables.go | 0 webui/{ => backend}/server.go | 8 ++++---- webui/{ => backend}/websocket/websocket.go | 0 7 files changed, 4 insertions(+), 4 deletions(-) rename webui/{ => backend}/auth/auth.go (100%) rename webui/{ => backend}/auth/authModel.go (100%) rename webui/{ => backend}/auth/database.go (100%) rename webui/{ => backend}/auth/errors.go (100%) rename webui/{ => backend}/auth/variables.go (100%) rename webui/{ => backend}/server.go (98%) rename webui/{ => backend}/websocket/websocket.go (100%) diff --git a/webui/auth/auth.go b/webui/backend/auth/auth.go similarity index 100% rename from webui/auth/auth.go rename to webui/backend/auth/auth.go diff --git a/webui/auth/authModel.go b/webui/backend/auth/authModel.go similarity index 100% rename from webui/auth/authModel.go rename to webui/backend/auth/authModel.go diff --git a/webui/auth/database.go b/webui/backend/auth/database.go similarity index 100% rename from webui/auth/database.go rename to webui/backend/auth/database.go diff --git a/webui/auth/errors.go b/webui/backend/auth/errors.go similarity index 100% rename from webui/auth/errors.go rename to webui/backend/auth/errors.go diff --git a/webui/auth/variables.go b/webui/backend/auth/variables.go similarity index 100% rename from webui/auth/variables.go rename to webui/backend/auth/variables.go diff --git a/webui/server.go b/webui/backend/server.go similarity index 98% rename from webui/server.go rename to webui/backend/server.go index 0193d0de..fe1a422b 100755 --- a/webui/server.go +++ b/webui/backend/server.go @@ -1,4 +1,4 @@ -package webui +package backend import ( "encoding/json" @@ -9,8 +9,8 @@ import ( "io/ioutil" "github.com/Pegasus8/piworker/processment/stats" - "github.com/Pegasus8/piworker/webui/auth" - "github.com/Pegasus8/piworker/webui/websocket" + "github.com/Pegasus8/piworker/webui/backend/auth" + "github.com/Pegasus8/piworker/webui/backend/websocket" "github.com/Pegasus8/piworker/processment/data" "github.com/Pegasus8/piworker/processment/configs" triggersList"github.com/Pegasus8/piworker/processment/elements/triggers/models" @@ -37,7 +37,7 @@ type postResponse struct { func setupRoutes() { defer auth.Database.Close() - box := packr.New("WebUI", "./frontend/dist") + box := packr.New("WebUI", "../frontend/dist") router := mux.NewRouter() diff --git a/webui/websocket/websocket.go b/webui/backend/websocket/websocket.go similarity index 100% rename from webui/websocket/websocket.go rename to webui/backend/websocket/websocket.go