This commit is contained in:
fallen-angle
2022-01-20 16:49:37 +08:00
parent 2280679053
commit 582807ae10
13 changed files with 182 additions and 16 deletions

View File

@@ -2,6 +2,7 @@ package router
import (
"nCovTrack-Backend/global"
"nCovTrack-Backend/service/statistics"
"net/http"
"time"
@@ -12,12 +13,11 @@ func BusiRouter() {
userRouter := global.RootRouter.Group("/user")
{
userRouter.GET("/count", func(c *gin.Context) {
panic("count err")
time.Sleep(800 * time.Millisecond)
c.String(http.StatusOK, "OK")
})
userRouter.GET("/test", func(c *gin.Context) {
c.String(http.StatusOK, "OK")
c.JSON(http.StatusOK, statistics.GetChinaNCovStatistic())
})
}
}