Return license info after app config modified (#1137)

This commit is contained in:
Zach Wasserman 2021-06-18 08:34:49 -07:00 committed by GitHub
parent 0255638f0b
commit 4f8ad2daa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {