Adds handlers/version.go with GetVersion handler returning hardcoded {"version":"0.1.0","name":"director","commit":"unknown"}
Wires GET /api/version into main.go next to /api/health
Adds handlers/version_test.go using net/http/httptest (no DB dependency — handler is stateless)
Verification
TestGetVersion passes: go test ./handlers/ -run TestGetVersion → PASS
Pre-existing go test ./... failures in handlers (TestGetStats nil DB panic) and main package (undefined method stubs) are unchanged from main baseline — not introduced by this PR
Tasks Completed
Task 24: Write /api/version handler, test, and wire route
Task 26: Branch, commit, and open PR
Notes
Task 24 was blocked by repeated MockDB errors from backend-dev. Version handler has zero DB dependency; test follows same httptest.NewRecorder + gin.CreateTestContext pattern as stats_test.go.
## Summary
- Adds `handlers/version.go` with `GetVersion` handler returning hardcoded `{"version":"0.1.0","name":"director","commit":"unknown"}`
- Wires `GET /api/version` into `main.go` next to `/api/health`
- Adds `handlers/version_test.go` using `net/http/httptest` (no DB dependency — handler is stateless)
## Verification
- `TestGetVersion` passes: `go test ./handlers/ -run TestGetVersion` → PASS
- Pre-existing `go test ./...` failures in handlers (TestGetStats nil DB panic) and main package (undefined method stubs) are unchanged from `main` baseline — not introduced by this PR
## Tasks Completed
- [x] Task 24: Write /api/version handler, test, and wire route
- [x] Task 26: Branch, commit, and open PR
## Notes
Task 24 was blocked by repeated `MockDB` errors from backend-dev. Version handler has zero DB dependency; test follows same `httptest.NewRecorder` + `gin.CreateTestContext` pattern as `stats_test.go`.
Adds handlers/version.go returning hardcoded {"version":"0.1.0","name":"director","commit":"unknown"},
wires GET /api/version into main.go next to /api/health, and adds
handlers/version_test.go using httptest (no DB dependency).
Co-Authored-By: director-agent <director-agent@dragonchain.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
handlers/version.gowithGetVersionhandler returning hardcoded{"version":"0.1.0","name":"director","commit":"unknown"}GET /api/versionintomain.gonext to/api/healthhandlers/version_test.gousingnet/http/httptest(no DB dependency — handler is stateless)Verification
TestGetVersionpasses:go test ./handlers/ -run TestGetVersion→ PASSgo test ./...failures in handlers (TestGetStats nil DB panic) and main package (undefined method stubs) are unchanged frommainbaseline — not introduced by this PRTasks Completed
Notes
Task 24 was blocked by repeated
MockDBerrors from backend-dev. Version handler has zero DB dependency; test follows samehttptest.NewRecorder+gin.CreateTestContextpattern asstats_test.go.Adds handlers/version.go returning hardcoded {"version":"0.1.0","name":"director","commit":"unknown"}, wires GET /api/version into main.go next to /api/health, and adds handlers/version_test.go using httptest (no DB dependency). Co-Authored-By: director-agent <director-agent@dragonchain.com>Pull request closed