k.zhang 4 years ago
parent
commit
cf6ea3c0d0
2 changed files with 3 additions and 4 deletions
  1. 1 1
      root.txt
  2. 2 3
      routers/router.go

+ 1 - 1
root.txt

@@ -1 +1 @@
-7d91e2e14e42bae37c4c97f5e01180a3
+c3059593c4d2407cda3483f13f6b5486

+ 2 - 3
routers/router.go

@@ -3,14 +3,13 @@ package routers
 import (
 	"duoduo/apis/pdd"
 	"github.com/gin-gonic/gin"
-	"net/http"
 )
 
 func InitRouter() {
 
 	r := gin.New()
-	r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "7d91e2e14e42bae37c4c97f5e01180a3") })
-	r.GET("/root.txt", func(c *gin.Context) { c.String(http.StatusOK, "7d91e2e14e42bae37c4c97f5e01180a3") })
+	r.GET("/", func(c *gin.Context) { c.File("./root.txt") })
+	r.GET("/root.txt", func(c *gin.Context) { c.File("./root.txt") })
 	r2 := r.Group("/")
 	{
 		pdd.InitPddDdkRouter(r2)