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 // NewEmployeeHandler creates a new EmployeeHandler
func NewEmployeeHandler() *EmployeeHandler { func NewEmployeeHandler() *EmployeeHandler {
return &%!s(MISSING)Handler{} return &EmployeeHandler{}
} }
// GetEmployee godoc // GetEmployee godoc
// @Summary Get employee // @Summary Get employee

View File

@@ -4,15 +4,16 @@ import (
"net/http" "net/http"
"api-service/internal/config" "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" "api-service/internal/middleware"
services "api-service/internal/services/auth" services "api-service/internal/services/auth"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
swaggerFiles "github.com/swaggo/files" swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger" 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 // RegisterRoutes registers all API routes for version 1

View File

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