pembaruan generete tool

This commit is contained in:
2025-08-16 08:37:38 +07:00
parent ac15da3ed3
commit 229782dad8
4 changed files with 113 additions and 354 deletions

View File

@@ -13,7 +13,6 @@ import (
authHandlers "api-service/internal/handlers/auth"
componentHandlers "api-service/internal/handlers/component"
employeeHandlers "api-service/internal/handlers/employee"
)
// RegisterRoutes registers all API routes for version 1
@@ -57,15 +56,6 @@ func RegisterRoutes(cfg *config.Config) *gin.Engine {
// Protected routes (require authentication)
// Employee endpoints
employeeHandler := employeeHandlers.NewEmployeeHandler()
v1.GET("/employees", employeeHandler.GetEmployee)
v1.GET("/employees/:id", employeeHandler.GetEmployeeByID)
v1.POST("/employees", employeeHandler.CreateEmployee)
v1.PUT("/employees/:id", employeeHandler.UpdateEmployee)
v1.DELETE("/employees/:id", employeeHandler.DeleteEmployee)
protected := v1.Group("/")
protected.Use(middleware.JWTAuthMiddleware(authService))
{