add register tmpl

This commit is contained in:
zhangchao
2024-12-19 10:29:31 +08:00
parent 8de9cf366b
commit f0d2312964
2 changed files with 43 additions and 0 deletions

View File

@@ -101,6 +101,12 @@ func registerRoutes(r *gin.Engine) {
"user": user,
})
})
r.GET("/register", func(c *gin.Context) {
c.HTML(200, "register.tmpl", map[string]interface{}{
"title": "这个是titile,传入templates中的",
"user": user,
})
})
r.GET("/ws", controllers.WebSocketHandler)
r.POST("/content", controllers.CreateContentHandler)