From d4ee90de45e9c34c78e984487d88ccec45828bec Mon Sep 17 00:00:00 2001 From: nutcas3 Date: Fri, 17 Apr 2026 16:32:00 +0300 Subject: [PATCH] feat: Add BaseURL method to API client for exposing configured endpoint - Add BaseURL() method to return configured API endpoint - Add godoc comment describing use case for UI display --- apps/cli/internal/api/client.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/cli/internal/api/client.go b/apps/cli/internal/api/client.go index 2a3f8f4..43e4ed5 100644 --- a/apps/cli/internal/api/client.go +++ b/apps/cli/internal/api/client.go @@ -32,6 +32,11 @@ func NewClient(cfg *types.CLIConfig) *Client { } } +// BaseURL returns the configured API endpoint (useful for UI display). +func (c *Client) BaseURL() string { + return c.baseURL +} + // doGetJSON performs a GET request and decodes JSON into out func (c *Client) doGetJSON(path string, out any) error { req, err := http.NewRequest("GET", c.baseURL+path, nil)