From 46c3219f9572ce4d0c378731c54912ca5108cdf3 Mon Sep 17 00:00:00 2001 From: fbonhomm Date: Sat, 24 Aug 2019 20:51:27 +0200 Subject: [PATCH] feat: add routes folder with user route --- source/routers/user.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 source/routers/user.go diff --git a/source/routers/user.go b/source/routers/user.go new file mode 100644 index 0000000..08d573a --- /dev/null +++ b/source/routers/user.go @@ -0,0 +1,25 @@ +/** + * Created by fbonhomm + * Email: flo-github@outlook.fr + * Licence: MIT + */ + +package routers + +import ( + "github.com/fbonhomm/api-go/source/controllers" + "github.com/fbonhomm/api-go/source/validators" + "github.com/gin-gonic/gin" +) + +// main +func User(router *gin.Engine) { + route := router.Group("/users") + { + route.POST("/", validators.ValidateUserCreate, controllers.UserCreate) + route.GET("/:id", validators.ValidateUserGetId, controllers.UserGetId) + // route.GET("/", fetchAllTodo) + // route.PUT("/:id", updateTodo) + // route.DELETE("/:id", deleteTodo) + } +}