mirror of
https://github.com/shankar0123/certctl.git
synced 2026-06-10 16:59:23 +00:00
Merge branch 'fix/d1-cli-status-endpoint'
This commit is contained in:
@@ -612,7 +612,7 @@ func (c *Client) CancelJob(id string) error {
|
|||||||
|
|
||||||
// GetStatus retrieves server health and summary stats.
|
// GetStatus retrieves server health and summary stats.
|
||||||
func (c *Client) GetStatus() error {
|
func (c *Client) GetStatus() error {
|
||||||
resp, err := c.do("GET", "/api/v1/health", nil, nil)
|
resp, err := c.do("GET", "/health", nil, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ func TestClient_GetStatus(t *testing.T) {
|
|||||||
|
|
||||||
w.Header().Set("Content-Type", "application/json")
|
w.Header().Set("Content-Type", "application/json")
|
||||||
|
|
||||||
if r.URL.Path == "/api/v1/health" {
|
if r.URL.Path == "/health" {
|
||||||
json.NewEncoder(w).Encode(map[string]interface{}{
|
json.NewEncoder(w).Encode(map[string]interface{}{
|
||||||
"status": "healthy",
|
"status": "healthy",
|
||||||
"timestamp": time.Now().Format(time.RFC3339),
|
"timestamp": time.Now().Format(time.RFC3339),
|
||||||
|
|||||||
Reference in New Issue
Block a user