refactor: merge internal/sync into internal/garmin, regroup api files and routes
Garmin auth/sync routes move under /api/garmin/*; sync.Service becomes garmin.Sync with garmin.SyncConfig/ClientConfig; applog becomes internal/log; the test mock moves into the garmin package as MockClient (breaking the test-only import cycle the merge created); stale test URLs and type names updated to match. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,7 @@ After the schema edit, regenerate `docs/DATABASE.md` via `go run
|
||||
|
||||
### Backend API
|
||||
|
||||
- **`handleAuthLogin`/`handleAuthMFA`** (`internal/api/auth.go`): right after
|
||||
- **`handleGarminAuthLogin`/`handleGarminAuthMFA`** (`internal/api/auth.go`): right after
|
||||
the existing `s.recordAuthResult(userID, res)` call, if `res.Status ==
|
||||
garmin.AuthSuccess`, call `s.DB.MarkGarminConnected(r.Context(), userID)`.
|
||||
A failure here is logged and does *not* fail the HTTP response -- the
|
||||
|
||||
Reference in New Issue
Block a user