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.Static("/static", "resources/static")
router.GET("/", index) router.GET("/", index)
router.GET("/room/:roomid", roomGET) router.GET("/room/:roomid", roomGET)
router.POST("/room/:roomid", roomPOST) router.POST("/room-post/:roomid", roomPOST)
//router.DELETE("/room/:roomid", roomDELETE) //router.DELETE("/room/:roomid", roomDELETE)
router.GET("/stream/:roomid", streamRoom) router.GET("/stream/:roomid", streamRoom)

View File

@ -74,7 +74,7 @@
</table> </table>
</div> </div>
{{if .nick}} {{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"> <div class="form-group">
<label class="sr-only" for="chat-message">Message</label> <label class="sr-only" for="chat-message">Message</label>
<div class="input-group"> <div class="input-group">

View File

@ -75,7 +75,7 @@ function stats(e) {
heapChart.push(data.heap) heapChart.push(data.heap)
mallocsChart.push(data.mallocs) mallocsChart.push(data.mallocs)
goroutinesChart.push(data.goroutines) goroutinesChart.push(data.goroutines)
if(messagesChart) { if (typeof messagesChart !== 'undefined') {
messagesChart.push(data.messages) messagesChart.push(data.messages)
} }
} }