Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.
Merged

Dev #19

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/gateway/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ func main() {
"http://127.0.0.1:3000",
"https://techtorque.vercel.app",
"https://techtorque.randitha.net",
"https://dev.techtorque.randitha.net",
},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"},
AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token"},
Expand Down
2 changes: 2 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
target_url: "http://localhost:8083"
strip_prefix: "/api/v1"
auth_required: false # Public endpoint
env_var: "APPOINTMENTS_SERVICE_URL"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Inconsistent env_var handling for appointments services—standardize declaration approach.

The "appointments-availability" and "service-types" services now explicitly declare env_var: "APPOINTMENTS_SERVICE_URL", but the related "appointments" service (line 42–47) omits the env_var field and relies on auto-generation. This creates an inconsistency with the established pattern in the config: services sharing a backend (auth+users, services+projects, payments+invoices) all use explicit env_var declarations.

If auto-generation occurs for "appointments" but explicit declarations are made for "appointments-availability" and "service-types", there's a risk of env_var mismatch or confusion about which variable controls which service.

For consistency and clarity, add env_var: "APPOINTMENTS_SERVICE_URL" to the "appointments" service as well.

  # Protected appointment endpoints
  - name: "appointments"
    path_prefix: "/api/v1/appointments"
    target_url: "http://localhost:8083"
    strip_prefix: "/api/v1"
    auth_required: true
-   # env_var not specified - will auto-generate: APPOINTMENTS_SERVICE_URL
+   env_var: "APPOINTMENTS_SERVICE_URL"

Also update the comment on line 47 to be consistent with the new explicit declaration.

Also applies to: 55-55

🤖 Prompt for AI Agents
In config.yaml around lines 42 to 47 (and also line 55), the "appointments"
service is missing an explicit env_var while related services use env_var:
"APPOINTMENTS_SERVICE_URL"; add env_var: "APPOINTMENTS_SERVICE_URL" to the
"appointments" service block (same indentation as the other services) and update
the comment on line 47 to reflect the explicit declaration (make it consistent
with the other services' comments); repeat the same explicit env_var insertion
for the related occurrence at line 55.


# Protected appointment endpoints
- name: "appointments"
Expand All @@ -51,6 +52,7 @@ services:
target_url: "http://localhost:8083"
strip_prefix: "/api/v1"
auth_required: true
env_var: "APPOINTMENTS_SERVICE_URL"

# --- Service & Project Management Service (Port 8084) ---
- name: "services"
Expand Down
Loading