From 4f8ad2daa05ac2ec93853c98aeeb6b465a9ffcd5 Mon Sep 17 00:00:00 2001 From: Zach Wasserman Date: Fri, 18 Jun 2021 08:34:49 -0700 Subject: [PATCH] Return license info after app config modified (#1137) --- server/service/endpoint_appconfig.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/service/endpoint_appconfig.go b/server/service/endpoint_appconfig.go index 2e25eb864..37fa579e7 100644 --- a/server/service/endpoint_appconfig.go +++ b/server/service/endpoint_appconfig.go @@ -85,7 +85,7 @@ func makeGetAppConfigEndpoint(svc fleet.Service) endpoint.Endpoint { HostSettings: &fleet.HostSettings{ AdditionalQueries: config.AdditionalQueries, }, - License: license, + License: license, AgentOptions: agentOptions, } return response, nil @@ -99,6 +99,10 @@ func makeModifyAppConfigEndpoint(svc fleet.Service) endpoint.Endpoint { if err != nil { return appConfigResponse{Err: err}, nil } + license, err := svc.License(ctx) + if err != nil { + return nil, err + } response := appConfigResponse{ OrgInfo: &fleet.OrgInfo{ OrgName: &config.OrgName, @@ -123,6 +127,7 @@ func makeModifyAppConfigEndpoint(svc fleet.Service) endpoint.Endpoint { HostExpiryEnabled: &config.HostExpiryEnabled, HostExpiryWindow: &config.HostExpiryWindow, }, + License: license, AgentOptions: config.AgentOptions, } if response.SMTPSettings.SMTPPassword != nil {