feat(sms): add sms login method
This commit is contained in:
@ -3,9 +3,11 @@ package routers
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"health-go/handlers"
|
||||
"health-go/services/sms"
|
||||
)
|
||||
|
||||
func SetupRouter() *gin.Engine {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
r := gin.Default()
|
||||
|
||||
// user
|
||||
@ -13,12 +15,17 @@ func SetupRouter() *gin.Engine {
|
||||
r.GET("/firstUser", handlers.FirstUser)
|
||||
|
||||
// record
|
||||
r.GET("/fetchHosList", handlers.FetchHospitalList)
|
||||
r.GET("/fetchAllRec", handlers.FetchAllRecords)
|
||||
r.POST("/api/insertRec", handlers.InsertRecord)
|
||||
|
||||
// hospital
|
||||
r.GET("/fetchHosList", handlers.FetchHospitalList) // fetch all hospitals
|
||||
r.POST("/api/addHos", handlers.AddHospital) // add hospital
|
||||
r.POST("/api/modifyHos", handlers.ModifyHospital) // modify hospital
|
||||
r.DELETE("/api/deleteHos", handlers.DeleteHospital) // delete hospital
|
||||
|
||||
// sms
|
||||
r.POST("/api/sendSMS", sms.Request)
|
||||
r.POST("/api/validateSMS", sms.Validate)
|
||||
return r
|
||||
}
|
||||
|
Reference in New Issue
Block a user