diff options
Diffstat (limited to 'server/sonar-web/src/main/js/api/settings.js')
-rw-r--r-- | server/sonar-web/src/main/js/api/settings.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/server/sonar-web/src/main/js/api/settings.js b/server/sonar-web/src/main/js/api/settings.js index 4b8dbb9d527..a5212c18453 100644 --- a/server/sonar-web/src/main/js/api/settings.js +++ b/server/sonar-web/src/main/js/api/settings.js @@ -21,16 +21,16 @@ import omitBy from 'lodash/omitBy'; import { getJSON, post, postJSON } from '../helpers/request'; import { TYPE_PROPERTY_SET } from '../apps/settings/constants'; -export function getDefinitions (componentKey) { +export function getDefinitions(componentKey) { const url = '/api/settings/list_definitions'; - const data = { }; + const data = {}; if (componentKey) { data.component = componentKey; } return getJSON(url, data).then(r => r.definitions); } -export function getValues (keys, componentKey) { +export function getValues(keys, componentKey) { const url = '/api/settings/values'; const data = { keys }; if (componentKey) { @@ -39,7 +39,7 @@ export function getValues (keys, componentKey) { return getJSON(url, data).then(r => r.settings); } -export function setSettingValue (definition, value, componentKey) { +export function setSettingValue(definition, value, componentKey) { const url = '/api/settings/set'; const { key } = definition; @@ -49,8 +49,8 @@ export function setSettingValue (definition, value, componentKey) { data.values = value; } else if (definition.type === TYPE_PROPERTY_SET) { data.fieldValues = value - .map(fields => omitBy(fields, value => value == null)) - .map(JSON.stringify); + .map(fields => omitBy(fields, value => value == null)) + .map(JSON.stringify); } else { data.value = value; } @@ -62,7 +62,7 @@ export function setSettingValue (definition, value, componentKey) { return post(url, data); } -export function resetSettingValue (key, componentKey) { +export function resetSettingValue(key, componentKey) { const url = '/api/settings/reset'; const data = { keys: key }; if (componentKey) { @@ -71,28 +71,28 @@ export function resetSettingValue (key, componentKey) { return post(url, data); } -export function sendTestEmail (to, subject, message) { +export function sendTestEmail(to, subject, message) { const url = '/api/emails/send'; const data = { to, subject, message }; return post(url, data); } -export function checkSecretKey () { +export function checkSecretKey() { return getJSON('/api/settings/check_secret_key'); } -export function generateSecretKey () { +export function generateSecretKey() { return postJSON('/api/settings/generate_secret_key'); } -export function encryptValue (value) { +export function encryptValue(value) { return postJSON('/api/settings/encrypt', { value }); } -export function getServerId () { +export function getServerId() { return getJSON('/api/server_id/show'); } -export function generateServerId (organization, ip) { +export function generateServerId(organization, ip) { return postJSON('/api/server_id/generate', { organization, ip }); } |