Fixed some bug in realtime-advanced demo

This commit is contained in:
Manu Mtz-Almeida 2015-05-13 17:34:42 +02:00
parent 1f11541011
commit 7149009a84
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -74,7 +74,7 @@
</table>
</div>
{{if .nick}}
<form class="form-inline" id="chat-form" action="/room/{{.roomid}}?nick={{.nick}}" method="post">
<form class="form-inline" id="chat-form" action="/room-post/{{.roomid}}?nick={{.nick}}" method="post">
<div class="form-group">
<label class="sr-only" for="chat-message">Message</label>
<div class="input-group">

View File

@ -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)
}
}