firmanJS/boillerplate-fiber

View on GitHub
routers/employe.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/employe"
"github.com/gofiber/fiber/v2"
)
 
// SetupRoutes Employe
func EmployeRoutes(api fiber.Router) {
 
route := api.Group("/employe")
route.Get("/", employe.GetAll)
route.Post("/", employe.CreateNew)
route.Delete("/:id", employe.DeleteSingle)
route.Delete("/", employe.DeleteAll)
route.Get("/:id", employe.GetSingle)
route.Put("/:id", employe.UpdateSingle)
 
}