diff --git a/doc/architecture/postit-oidc.md b/doc/architecture/postit-oidc.md index ee003b41..ddedbfde 100644 --- a/doc/architecture/postit-oidc.md +++ b/doc/architecture/postit-oidc.md @@ -56,6 +56,7 @@ pas vers un serveur HTTP. |---------------------------------|-------------------------------------------------------------------| | `Services/OidcLoginPhase` | Enum des étapes du flow : `Idle / Discovering / OpeningBrowser / AwaitingCallback / ExchangingCode / Success / Error` | | `Services/YavscApiClient` | Client HTTP de l'API Yavsc. Porte `LoginInteractiveAsync(IProgress)` et `TrySilentLoginAsync`. Refresh silencieux sur 401 et sur access-token bientôt expiré. | +| `Services/BlogApiClient` | Mapper DTO↔path pour la sous-API blog. **Note** : `pathPrefix` est *relatif* à `/api/v1/` (que porte déjà `BaseAddress`) — ex. `"blog"` pour matcher `[Route(APIPrefix + "/blog")]`. Ne pas ré-inclure `api/`. | | `Services/SingleInstance` | Named-pipe helper. `TryHandOffAsync` côté 2ᵉ instance, `StartServerAsync` côté instance vivante. | | `Services/CustomSchemeBrowser` | `IBrowser` OidcClient qui ouvre le système + attend le pipe. | | `Services/SchemeUrlDetector` | Détection pure, testable, du `postit://callback` dans argv. | diff --git a/src/PostIt/PostIt/Services/BlogApiClient.cs b/src/PostIt/PostIt/Services/BlogApiClient.cs index 5ebfe264..d489be60 100644 --- a/src/PostIt/PostIt/Services/BlogApiClient.cs +++ b/src/PostIt/PostIt/Services/BlogApiClient.cs @@ -15,6 +15,16 @@ namespace PostIt.Services; /// . This class is a thin DTO↔path /// mapper, nothing more. /// +/// URL convention. 's +/// BaseAddress already terminates with /api/v1/ +/// (see Settings.ApiUrl). The path prefix below is +/// therefore relative to that version segment: a prefix of +/// "blog" resolves to …/api/v1/blog, which matches +/// the [Route(APIPrefix + "/blog")] attribute on +/// Yavsc.Blogs.Controllers.BlogApiController. Do not +/// re-include the api/ segment here — that produced 404s +/// in the past (see commit "PostIt: fix blog API double-prefix"). +/// /// The class is intentionally non-IDisposable: it does not own the /// it depends on. Lifetimes are managed /// by the consumer (typically a singleton service registered with