perbaikan

This commit is contained in:
2025-08-15 20:34:19 +07:00
parent 66f6d0a83b
commit c14587996e
3 changed files with 6 additions and 5 deletions

View File

@@ -14,7 +14,7 @@ type EmployeeHandler struct{}
// NewEmployeeHandler creates a new EmployeeHandler
func NewEmployeeHandler() *EmployeeHandler {
return &%!s(MISSING)Handler{}
return &EmployeeHandler{}
}
// GetEmployee godoc
// @Summary Get employee

View File

@@ -4,15 +4,16 @@ import (
"net/http"
"api-service/internal/config"
authHandlers "api-service/internal/handlers/auth"
componentHandlers "api-service/internal/handlers/component"
employeeHandlers "api-service/internal/handlers/employee"
"api-service/internal/middleware"
services "api-service/internal/services/auth"
"github.com/gin-gonic/gin"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
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

View File

@@ -284,7 +284,6 @@ type %sGetByIDResponse struct {
}
if data.HasPost {
modelContent += fmt.Sprintf(`// %sCreateRequest represents the request for creating %s
type %sCreateRequest struct {
Name string `+"`json:\"name\" binding:\"required\"`"+`
// Add more fields as needed
@@ -335,6 +334,7 @@ type ErrorResponse struct {
}
func updateRoutesFile(data HandlerData) {
fmt.Println("Updating routes file...") // Debug statement
routesFile := "internal/routes/v1/routes.go"
// Read existing routes file