mirror of https://github.com/gin-gonic/gin.git
Fixed some bug in realtime-advanced demo
This commit is contained in:
parent
1f11541011
commit
7149009a84
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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">
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue