-
Notifications
You must be signed in to change notification settings - Fork 0
Script update and reponde to / #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ import ( | |
| func setupHandlers(router *gin.Engine) { | ||
| // TODO: Replace gin default logger with zap | ||
| // router.Use(gin.Recovery()) | ||
| router.GET("/", func(ctx *gin.Context) {}) | ||
|
|
||
| router.Use(middleware.CorsHeader()) | ||
| api := router.Group("/api") | ||
|
Comment on lines
15
to
19
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Register CORS middleware before routes 🤖 Prompt for AI Agents |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,14 @@ | |
|
|
||
| # --- Configuration --- | ||
| # !!! REPLACE WITH YOUR ACTUAL API BASE URL !!! | ||
| API_BASE_URL="http://localhost:8090/api" # Example: might be http://localhost:8080 | ||
| API_BASE_URL="http://192.168.0.127:8090/api" # Example: might be http://localhost:8080 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Parameterize the API base URL API_BASE_URL="${API_BASE_URL:-http://192.168.0.127:8090/api}"🤖 Prompt for AI Agents |
||
|
|
||
| # --- Existing User Credentials and UUID --- | ||
| # !!! REPLACE WITH THE DETAILS OF AN EXISTING USER !!! | ||
| EXISTING_USER_EMAIL="bash.user@example.com" | ||
| # EXISTING_USER_EMAIL="bash.user@example.com" | ||
| EXISTING_USER_EMAIL="lkovacic@test.hr" | ||
|
Comment on lines
+12
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick (assertive) Clean up stale commented placeholders 🤖 Prompt for AI Agents |
||
| EXISTING_USER_PASSWORD='Pa$$w0rd' | ||
| EXISTING_USER_UUID="9fea1366-82fe-4775-ba1e-772b77105bb0" # e.g., "a1b2c3d4-e5f6-7890-1234-567890abcdef" | ||
| EXISTING_USER_UUID="d0499fb2-9d15-47c0-9cfc-408295407349" # e.g., "a1b2c3d4-e5f6-7890-1234-567890abcdef" | ||
|
|
||
| # --- New Vehicle Details --- | ||
| # Generate a somewhat unique identifier for testing vehicle details | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Empty root handler will hang requests
The GET “/” handler is currently a no-op and doesn’t write any response. In Gin, if you don’t send a status or body, the client will wait indefinitely. At minimum, return a health-check response (e.g.,
ctx.JSON(200, gin.H{"status":"ok"})) or set a status code.🤖 Prompt for AI Agents