Skip to content

Commit

Permalink
feat(settings): 🌟 add restart_required endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
vanntile committed Jan 22, 2024
1 parent bb8fd4e commit 9ef8872
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions api/settings/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,14 @@ func (store *Settings) SectionSchema(scope, section string) (*json.RawMessage, e

return schema, err
}

// RestartRequired get restart required information for given settings and scope
func (store *Settings) RestartRequired(settings *json.RawMessage, scope string) (*json.RawMessage, error) {
isRestartRequiredResponse := &json.RawMessage{}

_, err := store.api.
URL("/settings/api/v1/restart_required/%s", url.PathEscape(scope)).
Post(settings, isRestartRequiredResponse)

return isRestartRequiredResponse, err
}

0 comments on commit 9ef8872

Please sign in to comment.