Add authentication, styling needs to be fixed
# Conflicts: # starter/ent/runtime.go # starter/go.mod # starter/go.sum # starter/routes/routing.go
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
. "git.gorlug.de/code/ersteller"
|
||||
"git.gorlug.de/code/ersteller/authentication"
|
||||
google_http "git.gorlug.de/code/ersteller/authentication/google/http"
|
||||
@@ -13,7 +15,6 @@ import (
|
||||
"git.gorlug.de/code/ersteller/starter/login"
|
||||
"git.gorlug.de/code/ersteller/starter/page"
|
||||
"git.gorlug.de/code/ersteller/starter/todos"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/sessions"
|
||||
. "maragu.dev/gomponents"
|
||||
@@ -97,7 +98,7 @@ func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
|
||||
En: "Login",
|
||||
De: "Anmelden",
|
||||
}, loginPaths)
|
||||
_ = login.NewPage(createPageFunc, server, &loginActivePath)
|
||||
_ = login.NewPage(createPageFunc, server, &loginActivePath, db, sessionStore)
|
||||
|
||||
serverWithMiddleWare := UseMiddleware(server, LoggingMiddleware, MakeGzipHandler,
|
||||
authentication.Middleware(sessionStore,
|
||||
|
||||
Reference in New Issue
Block a user