feat: add centralized API service layer for frontend
All checks were successful
Build MIPS Binary / build (push) Successful in 5m18s

- Create frontend/src/api/mod.rs with centralized HTTP client and error handling
- Implement api::auth module (login, logout, check_auth, get_user)
- Implement api::torrent module (add, action, delete, start, stop, set_label, set_priority)
- Implement api::setup module (get_status, setup)
- Implement api::settings module (set_global_limits)
- Implement api::push module (get_public_key, subscribe)
- Update all components to use api service layer instead of direct gloo_net calls
- Add thiserror dependency for error handling
This commit is contained in:
spinline
2026-02-08 23:04:24 +03:00
parent 129a4c7586
commit cffc88443a
12 changed files with 387 additions and 281 deletions

View File

@@ -30,3 +30,4 @@ base64 = "0.22.1"
serde-wasm-bindgen = "0.6.5"
leptos-use = "0.13"
codee = "0.2"
thiserror = "2.0"