mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-23 23:05:44 +00:00
add migration;add api create employee
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package employeess
|
||||
|
||||
import (
|
||||
m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
|
||||
controller "gitlab.com/mbugroup/lti-api.git/internal/modules/master/employees/controllers"
|
||||
employees "gitlab.com/mbugroup/lti-api.git/internal/modules/master/employees/services"
|
||||
user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func EmployeesRoutes(v1 fiber.Router, u user.UserService, s employees.EmployeesService) {
|
||||
ctrl := controller.NewEmployeesController(s)
|
||||
|
||||
route := v1.Group("/employees")
|
||||
route.Use(m.Auth(u))
|
||||
|
||||
route.Get("/", ctrl.GetAll)
|
||||
route.Post("/", ctrl.CreateOne)
|
||||
route.Get("/:id", ctrl.GetOne)
|
||||
route.Patch("/:id", ctrl.UpdateOne)
|
||||
route.Delete("/:id", ctrl.DeleteOne)
|
||||
}
|
||||
Reference in New Issue
Block a user