add frame routes
This commit is contained in:
16
backend/routes/frame.go
Normal file
16
backend/routes/frame.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"git.cromer.cl/Proyecto-Titulo/alai-server/backend/controllers"
|
||||
"git.cromer.cl/Proyecto-Titulo/alai-server/backend/middlewares"
|
||||
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
func FrameRoutes(router *httprouter.Router) {
|
||||
router.GET("/frame", controllers.ListFrame)
|
||||
router.GET("/frame/:id", controllers.GetFrame)
|
||||
router.POST("/frame", middlewares.Authenticate(controllers.CreateFrame))
|
||||
router.PATCH("/frame/:id", middlewares.Authenticate(controllers.UpdateFrame))
|
||||
router.DELETE("/frame/:id", middlewares.Authenticate(controllers.DeleteFrame))
|
||||
}
|
@@ -17,6 +17,7 @@ import (
|
||||
func Initialize() *httprouter.Router {
|
||||
router := httprouter.New()
|
||||
router.GET("/", index)
|
||||
FrameRoutes(router)
|
||||
GameRoutes(router)
|
||||
LevelRoutes(router)
|
||||
OSRoutes(router)
|
||||
|
Reference in New Issue
Block a user