This commit is contained in:
2024-10-17 23:52:10 +08:00
commit 1e92c359f4
14 changed files with 447 additions and 0 deletions

22
routers/router.go Normal file
View File

@ -0,0 +1,22 @@
package routers
import (
"github.com/gin-gonic/gin"
"health-go/handlers"
)
func SetupRouter() *gin.Engine {
r := gin.Default()
// user
r.GET("/", handlers.TestPage)
r.GET("/firstUser", handlers.FirstUser)
// record
r.GET("/fetchHosList", handlers.FetchHospitalList)
r.GET("/fetchAllRec", handlers.FetchAllRecords)
// hospital
r.POST("/api/addHos", handlers.AddHospital)
return r
}