Improve view for better user accessibility

This commit is contained in:
2024-05-02 23:22:01 +07:00
parent c9d1037a68
commit 71c1f2c56f
4 changed files with 199 additions and 99 deletions

View File

@ -1,6 +1,7 @@
package indexHandler
import (
"github.com/fossyy/filekeeper/session"
"net/http"
"github.com/fossyy/filekeeper/logger"
@ -14,7 +15,8 @@ func init() {
}
func GET(w http.ResponseWriter, r *http.Request) {
component := indexView.Main("main page")
_, userSession, _ := session.GetSession(r)
component := indexView.Main("main page", userSession)
err := component.Render(r.Context(), w)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)