Allow PATCHing the app config domain (#1006)

This commit is contained in:
Mike Stone 2017-01-18 11:07:24 -05:00 committed by GitHub
parent 42ed377312
commit b28d96b5cc
3 changed files with 8 additions and 1 deletions

View file

@ -36,7 +36,7 @@ export const formatConfigDataForServer = (config) => {
const orgInfoAttrs = pick(config, ['org_logo_url', 'org_name']);
const serverSettingsAttrs = pick(config, ['kolide_server_url']);
const smtpSettingsAttrs = pick(config, [
'authentication_method', 'authentication_type', 'email_enabled', 'enable_ssl_tls',
'authentication_method', 'authentication_type', 'domain', 'email_enabled', 'enable_ssl_tls',
'enable_start_tls', 'password', 'port', 'sender_address', 'server', 'user_name', 'verify_ssl_certs',
]);

View file

@ -24,6 +24,7 @@ describe('Kolide API - helpers', () => {
org_logo_url: '0.0.0.0:8080/logo.png',
kolide_server_url: '',
configured: false,
domain: '',
sender_address: '',
server: '',
port: 587,
@ -48,6 +49,11 @@ describe('Kolide API - helpers', () => {
org_info: { org_name: 'The Gnar Co' },
server_settings: { kolide_server_url: 'https://example.com' },
});
expect(
formatConfigDataForServer({ domain: 'https://kolide.co' })
).toEqual({
smtp_settings: { domain: 'https://kolide.co' },
});
});
});

View file

@ -23,6 +23,7 @@ export const configStub = {
},
smtp_settings: {
configured: false,
domain: '',
sender_address: '',
server: '',
port: 587,