health-go/routers/router.go

23 lines
398 B
Go
Raw Normal View History

2024-10-17 23:52:10 +08:00
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
}