k.zhang il y a 4 ans
Parent
commit
63d1a87e0c
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      routers/router.go

+ 3 - 2
routers/router.go

@@ -3,13 +3,14 @@ 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.File("./root.txt") })
-	r.GET("/root.txt", func(c *gin.Context) { c.File("./root.txt") })
+	r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "7d91e2e14e42bae37c4c97f5e01180a3") })
+	r.GET("/root.txt", func(c *gin.Context) { c.String(http.StatusOK, "7d91e2e14e42bae37c4c97f5e01180a3") })
 	r2 := r.Group("/")
 	{
 		pdd.InitPddDdkRouter(r2)