From 7149009a8423863dab499eedb43a8f8b933530b4 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Wed, 13 May 2015 17:34:42 +0200 Subject: [PATCH] Fixed some bug in realtime-advanced demo --- examples/realtime-advanced/main.go | 2 +- examples/realtime-advanced/resources/room_login.templ.html | 2 +- examples/realtime-advanced/resources/static/realtime.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/realtime-advanced/main.go b/examples/realtime-advanced/main.go index fb6db71..a9cce4c 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 ce7b136..67a8e2e 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 7872dcb..7b9dcc6 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) } }