Fixes for latest gin api changes
This commit is contained in:
parent
64f0703c67
commit
9e9cf49b0d
4
web.go
4
web.go
|
@ -11,7 +11,7 @@ import (
|
||||||
|
|
||||||
func RunWebService(conn *RedisConnection) {
|
func RunWebService(conn *RedisConnection) {
|
||||||
r := gin.Default()
|
r := gin.Default()
|
||||||
r.HTMLTemplates = BuildTemplate()
|
r.SetHTMLTemplate(BuildTemplate())
|
||||||
|
|
||||||
r.GET("/", func(g *gin.Context) {
|
r.GET("/", func(g *gin.Context) {
|
||||||
g.HTML(200, "index.html", gin.H{"domain": DdnsDomain})
|
g.HTML(200, "index.html", gin.H{"domain": DdnsDomain})
|
||||||
|
@ -77,7 +77,7 @@ func RunWebService(conn *RedisConnection) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
ip, err := GetRemoteAddr(c.Req)
|
ip, err := GetRemoteAddr(c.Request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(400, gin.H{
|
c.JSON(400, gin.H{
|
||||||
"error": "Your sender IP address is not in the right format",
|
"error": "Your sender IP address is not in the right format",
|
||||||
|
|
Loading…
Reference in New Issue