feat: SSE bs into room

This commit is contained in:
efim
2023-11-05 15:00:36 +00:00
parent 648d3dff80
commit bb89b8ccf5
6 changed files with 173 additions and 4 deletions

View File

@@ -18,7 +18,11 @@ func indexPageRoute(
) http.HandlerFunc {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
var templFile = "templates/index.gohtml"
session := getContextSession(r.Context())
session, found := getContextSession(r.Context())
if !found {
log.Printf("/ session not found, should be impossible")
// TODO return error i guess
}
data := struct {
SessionStringToken string
SomeString string