diff --git a/main.go b/main.go
index f58d0e7..8619965 100644
--- a/main.go
+++ b/main.go
@@ -17,7 +17,7 @@ import (
"net/http"
"streifling.com/jason/sicherheitsunterweisung/packages/data"
- "streifling.com/jason/sicherheitsunterweisung/packages/session"
+ "streifling.com/jason/sicherheitsunterweisung/packages/server"
)
func main() {
@@ -26,16 +26,16 @@ func main() {
log.Fatalln(err)
}
- mux := session.NewMux()
- sessions := make([]*session.Session, 0)
- sessionChan := make(chan *session.Session)
+ mux := server.NewMux()
+ sessions := make([]*server.Session, 0)
+ sessionChan := make(chan *server.Session)
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static/"))))
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
template.Must(template.ParseFiles("templates/index.html", "templates/login.html")).Execute(w, nil)
})
- mux.HandleFunc("/internal-login/", session.HandleInternalLogin(db, &sessions, sessionChan))
- mux.HandleFunc("/external-login/", session.HandleExternalLogin(&sessions))
+ mux.HandleFunc("/internal-login/", server.HandleInternalLogin(db, &sessions, sessionChan))
+ mux.HandleFunc("/external-login/", server.HandleExternalLogin(&sessions))
go mux.HandleSessions(db, sessionChan, &sessions)
diff --git a/packages/session/briefing.go b/packages/server/briefing.go
similarity index 99%
rename from packages/session/briefing.go
rename to packages/server/briefing.go
index b5b2aea..9254bbb 100644
--- a/packages/session/briefing.go
+++ b/packages/server/briefing.go
@@ -9,7 +9,7 @@
* You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
-package session
+package server
import (
"crypto/rand"
diff --git a/packages/session/htmlStructs.go b/packages/server/htmlStructs.go
similarity index 98%
rename from packages/session/htmlStructs.go
rename to packages/server/htmlStructs.go
index f79d11f..c38c31d 100644
--- a/packages/session/htmlStructs.go
+++ b/packages/server/htmlStructs.go
@@ -9,7 +9,7 @@
* You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
-package session
+package server
import (
"github.com/google/uuid"
diff --git a/packages/session/login.go b/packages/server/login.go
similarity index 99%
rename from packages/session/login.go
rename to packages/server/login.go
index a599b25..7ea55fc 100644
--- a/packages/session/login.go
+++ b/packages/server/login.go
@@ -9,7 +9,7 @@
* You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
-package session
+package server
import (
"fmt"
diff --git a/packages/session/mux.go b/packages/server/mux.go
similarity index 99%
rename from packages/session/mux.go
rename to packages/server/mux.go
index e70bbb4..95dcf7f 100644
--- a/packages/session/mux.go
+++ b/packages/server/mux.go
@@ -9,7 +9,7 @@
* You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
-package session
+package server
import (
"fmt"
diff --git a/packages/session/participant.go b/packages/server/participant.go
similarity index 99%
rename from packages/session/participant.go
rename to packages/server/participant.go
index 71d1335..06637c6 100644
--- a/packages/session/participant.go
+++ b/packages/server/participant.go
@@ -9,7 +9,7 @@
* You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
-package session
+package server
import (
"fmt"
diff --git a/packages/session/session.go b/packages/server/session.go
similarity index 99%
rename from packages/session/session.go
rename to packages/server/session.go
index 47b178d..21691de 100644
--- a/packages/session/session.go
+++ b/packages/server/session.go
@@ -9,7 +9,7 @@
* You should have received a copy of the GNU General Public License along with this program. If not, see .
*/
-package session
+package server
import (
"html/template"