Skip to content

Commit ed8107c

Browse files
committed
feat(handlers.go): replace hardcoded API version with environment variable to allow dynamic versioning based on deployment configuration
1 parent db59460 commit ed8107c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/handlers/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (h *Handler) ApiV1Handler(c *fiber.Ctx) error {
4242
return c.JSON(fiber.Map{
4343
"status": "active",
4444
"message": "Welcome to NAQA API v1",
45-
"version": "1.0.0",
45+
"version": os.Getenv("API_VERSION"),
4646
"env": os.Getenv("ENVIRONMENT"),
4747
"server_time": time.Now().Format(time.RFC3339),
4848
"request_id": c.Get("X-Request-ID", uuid.New().String()),

0 commit comments

Comments
 (0)