health-go/routers/router.go
2024-10-20 16:31:37 +08:00

23 lines
398 B
Go

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
}