docs(docs-infra): update di factory provider function to use correct parameters

This PR fixes a parameter mismatch in the `apiClientFactory` function documentation example. The factory was previously passing only http and `userService` to the ``ApiClient`` constructor, but the constructor actually requires http, `baseUrl`, and `rateLimitMs` as separate parameters.

Key Changes:

Extracts baseUrl and rateLimitMs from UserService using getter methods
Updates the ApiClient instantiation to pass all three required constructor parameters
Adds a comment explaining the assumption about UserService providing these values

(cherry picked from commit 6f716e400e)
This commit is contained in:
KAUSHIK REDDY AWALA
2025-11-13 23:33:11 -06:00
committed by Jessica Janiuk
parent 4fb29588cf
commit 167eb584ed
@@ -565,7 +565,11 @@ const apiClientFactory = () => {
const http = inject(HttpClient);
const userService = inject(UserService);
return new ApiClient(http, userService);
// Assuming userService provides these values
const baseUrl = userService.getApiBaseUrl();
const rateLimitMs = userService.getRateLimit();
return new ApiClient(http, baseUrl, rateLimitMs);
};
// Provider configuration