feat: wire relay API with dependency injection
- split settings module into per-struct files
- add DatabaseSettings with default in-memory SQLite path
- implement RelayApi struct with GET /relays and POST
/relays/{id}/toggle
- wire create_relay_controller and create_label_repository into
Application::build() with mock/real selection via cfg!(test) || CI
- register RelayApi in OpenApiService alongside existing APIs
This commit is contained in:
@@ -37,5 +37,9 @@ tracing-subscriber = { version = "0.3.22", features = ["fmt", "std", "env-filter
|
||||
[dev-dependencies]
|
||||
tempfile = "3.15.0"
|
||||
|
||||
[[test]]
|
||||
name = "relay_api_contract"
|
||||
path = "tests/contract/test_relay_api.rs"
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
|
||||
|
||||
Reference in New Issue
Block a user