feat(auth): #154 send verification mails
This commit is contained in:
@@ -3,6 +3,7 @@ package service
|
||||
import (
|
||||
"database/sql"
|
||||
"me-fit/template"
|
||||
"me-fit/utils"
|
||||
"net/http"
|
||||
|
||||
"github.com/a-h/templ"
|
||||
@@ -10,8 +11,10 @@ import (
|
||||
|
||||
func HandleIndexAnd404(db *sql.DB) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
user := utils.GetUserFromSession(db, r)
|
||||
|
||||
var comp templ.Component = nil
|
||||
userComp := UserInfoComp(verifySessionAndReturnUser(db, r))
|
||||
userComp := UserInfoComp(user)
|
||||
|
||||
if r.URL.Path != "/" {
|
||||
comp = template.Layout(template.NotFound(), userComp)
|
||||
|
||||
Reference in New Issue
Block a user