diff --git a/examples/realtime-advanced/main.go b/examples/realtime-advanced/main.go index fb6db719..a9cce4c6 100644 --- a/examples/realtime-advanced/main.go +++ b/examples/realtime-advanced/main.go @@ -26,7 +26,7 @@ func main() { router.Static("/static", "resources/static") router.GET("/", index) router.GET("/room/:roomid", roomGET) - router.POST("/room/:roomid", roomPOST) + router.POST("/room-post/:roomid", roomPOST) //router.DELETE("/room/:roomid", roomDELETE) router.GET("/stream/:roomid", streamRoom) diff --git a/examples/realtime-advanced/resources/room_login.templ.html b/examples/realtime-advanced/resources/room_login.templ.html index ce7b1362..67a8e2e9 100644 --- a/examples/realtime-advanced/resources/room_login.templ.html +++ b/examples/realtime-advanced/resources/room_login.templ.html @@ -74,7 +74,7 @@ {{if .nick}} -
+
diff --git a/examples/realtime-advanced/resources/static/realtime.js b/examples/realtime-advanced/resources/static/realtime.js index 7872dcb8..7b9dcc6b 100644 --- a/examples/realtime-advanced/resources/static/realtime.js +++ b/examples/realtime-advanced/resources/static/realtime.js @@ -75,7 +75,7 @@ function stats(e) { heapChart.push(data.heap) mallocsChart.push(data.mallocs) goroutinesChart.push(data.goroutines) - if(messagesChart) { + if (typeof messagesChart !== 'undefined') { messagesChart.push(data.messages) } }