add godot version routes

This commit is contained in:
2023-02-01 13:08:28 -03:00
parent 4af5e9b621
commit ec3ea08187
3 changed files with 146 additions and 0 deletions

View 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 GodotVersionRoutes(router *httprouter.Router) {
router.GET("/godot-version", controllers.ListGodotVersion)
router.GET("/godot-version/:id", controllers.GetGodotVersion)
router.POST("/godot-version", middlewares.Authenticate(controllers.CreateGodotVersion))
router.PATCH("/godot-version/:id", middlewares.Authenticate(controllers.UpdateGodotVersion))
router.DELETE("/godot-version/:id", middlewares.Authenticate(controllers.DeleteGodotVersion))
}

View File

@@ -19,6 +19,7 @@ func Initialize() *httprouter.Router {
router.GET("/", index)
FrameRoutes(router)
GameRoutes(router)
GodotVersionRoutes(router)
LevelRoutes(router)
OSRoutes(router)
PlayerRoutes(router)