feat: add routes folder with user route

master
fbonhomm 2019-08-24 20:51:27 +02:00
parent 447715e1af
commit 46c3219f95
1 changed files with 25 additions and 0 deletions

25
source/routers/user.go Normal file
View File

@ -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)
}
}