From 48fa7349da5b10f7ea0ba821191ecedf3931f48f Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Sun, 2 Apr 2023 02:00:34 +0200 Subject: [PATCH] Add Pending Config Apply and Discard API Methods --- internal/api/config/pending.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/api/config/pending.go b/internal/api/config/pending.go index 7860236..db437e3 100644 --- a/internal/api/config/pending.go +++ b/internal/api/config/pending.go @@ -30,3 +30,11 @@ func (c *Config) GetPendingChangelog(ctx context.Context, params struct{}) (GetP Changelog: log, }, nil } + +func (c *Config) ApplyPendingChanges(ctx context.Context, params struct{}) (struct{}, error) { + return struct{}{}, c.ConfigManager.ApplyPendingChanges() +} + +func (c *Config) DiscardPendingChanges(ctx context.Context, params struct{}) (struct{}, error) { + return struct{}{}, c.ConfigManager.DiscardPendingConfig() +}