You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.3 KiB
27 lines
1.3 KiB
package users
|
|
|
|
import (
|
|
"git.devices.local/mawas/golang-api-skeleton/lib/authentication"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// ApplyRoutes applies router to the gin Engine
|
|
func ApplyRoutes(r *gin.RouterGroup) *gin.RouterGroup {
|
|
users := r.Group("/users")
|
|
{
|
|
users.POST("", authentication.Authorized, Create)
|
|
users.GET("/:username", authentication.Authorized, ReadByID)
|
|
users.GET("", authentication.Authorized, ReadAll)
|
|
// actions.GET("/:id/logs", middlewares.Authorized, actionlogs.ReadActionLogs)
|
|
// actions.PATCH("/:id", middlewares.Authorized, UpdateAction)
|
|
// actions.PATCH("", middlewares.Authorized, UpdateActions)
|
|
// actions.DELETE("/:id", middlewares.Authorized, DeleteAction)
|
|
// actions.DELETE("", middlewares.Authorized, DeleteActions)
|
|
// actions.GET("/:id/properties/*path", middlewares.Authorized, actionproperties.ReadActionProperty)
|
|
// actions.GET("/:id/properties", middlewares.Authorized, actionproperties.ReadActionProperties)
|
|
// actions.PUT("/:id/properties/*path", middlewares.Authorized, actionproperties.UpsertActionProperty)
|
|
// actions.PUT("/:id/properties", middlewares.Authorized, actionproperties.ReplaceActionProperties)
|
|
// actions.DELETE("/:id/properties/*path", middlewares.Authorized, actionproperties.DeleteActionProperty)
|
|
}
|
|
return r
|
|
}
|