This commit is contained in:
fallen-angle
2022-05-16 19:55:59 +08:00
parent 7598280fc1
commit 9e3638885d
34 changed files with 3623 additions and 115 deletions

View File

@@ -6,12 +6,18 @@ import (
"github.com/gin-gonic/gin"
)
func managementPublicRouter(router *gin.RouterGroup) {
func managementPrivateRouter(router *gin.RouterGroup) {
managementRouter := router.Group("/management")
{
managementRouter.GET("/observation/contact/pull/:patientId", handler.PullContactHandler)
managementRouter.GET("/faker/:patientId", handler.PullContactHandler)
managementRouter.GET("/observation", handler.ListObservationsHandler)
managementRouter.POST("/observation", handler.InsertObservationHandler)
managementRouter.GET("/observation/:id", handler.GetObservationHandler)
managementRouter.GET("/observation/tree/:id/:direction", handler.TreeifyObservationHandler)
managementRouter.PUT("/observation", handler.UpdateObservationHandler)
managementRouter.POST("/location/", handler.InsertLocationHandler)
managementRouter.GET("/location/", handler.ListLocationHandler)
managementRouter.DELETE("/location/", handler.DeleteLocationHandler)
managementRouter.POST("/pcr/", handler.InsertPcrHandler)
}
}

17
router/notify.go Normal file
View File

@@ -0,0 +1,17 @@
package router
import (
"nCovTrack-Backend/handler"
"github.com/gin-gonic/gin"
)
func notifyPrivateRouter(router *gin.RouterGroup) {
notifyRouter := router.Group("/notify")
{
notifyRouter.GET("/count", handler.CountNotificationHandler)
notifyRouter.POST("/", handler.InsertNotificationHandler)
notifyRouter.GET("/:start/:end", handler.ListNotificationHandler)
notifyRouter.DELETE("/:index", handler.DeleteNotificationHandler)
}
}

View File

@@ -15,12 +15,13 @@ func BusiRouter() {
statisticRouter(publicRouter)
articlePublicRouter(publicRouter)
userPublicRouter(publicRouter)
managementPublicRouter(publicRouter)
}
// Private
{
articlePrivateRouter(privateRouter)
userPrivateRouter(privateRouter)
notifyPrivateRouter(privateRouter)
managementPrivateRouter(privateRouter)
}
}