firmanJS/boillerplate-fiber

View on GitHub
routers/role.go

Summary

Maintainability
A
1 hr
Test Coverage
Similar blocks of code found in 2 locations. Consider refactoring.
package routers
 
import (
"github.com/firmanJS/boillerplate-fiber/api/role"
"github.com/gofiber/fiber/v2"
)
 
// SetupRoutes Role
func RoleRoutes(api fiber.Router) {
 
route := api.Group("/role")
route.Get("/", role.GetAll)
route.Post("/", role.CreateNew)
route.Delete("/:id", role.DeleteSingle)
route.Delete("/", role.DeleteAll)
route.Get("/:id", role.GetSingle)
route.Put("/:id", role.UpdateSingle)
}