diff options
author | Jay <jeremy.davis@sonarsource.com> | 2021-02-24 14:19:10 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-02-26 20:07:40 +0000 |
commit | 8a34c0093e84fbdc50afd2d864db7f9ced8d6e46 (patch) | |
tree | 5ff886122cad12545c5005bcb0b81caccb12943c /server/sonar-web/src/main/js/api | |
parent | 10fef4f93aeefcf8d79e7eb93742d4460c75d90b (diff) | |
download | sonarqube-8a34c0093e84fbdc50afd2d864db7f9ced8d6e46.tar.gz sonarqube-8a34c0093e84fbdc50afd2d864db7f9ced8d6e46.zip |
SONAR-14498 Support JSON field type in Settings
Diffstat (limited to 'server/sonar-web/src/main/js/api')
-rw-r--r-- | server/sonar-web/src/main/js/api/settings.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/sonar-web/src/main/js/api/settings.ts b/server/sonar-web/src/main/js/api/settings.ts index 2e8019d730a..03946b15832 100644 --- a/server/sonar-web/src/main/js/api/settings.ts +++ b/server/sonar-web/src/main/js/api/settings.ts @@ -22,8 +22,9 @@ import { getJSON, post, postJSON, RequestData } from 'sonar-ui-common/helpers/re import throwGlobalError from '../app/utils/throwGlobalError'; import { isCategoryDefinition } from '../apps/settings/utils'; import { BranchParameters } from '../types/branch-like'; +import { SettingCategoryDefinition, SettingDefinition, SettingValue } from '../types/settings'; -export function getDefinitions(component?: string): Promise<T.SettingCategoryDefinition[]> { +export function getDefinitions(component?: string): Promise<SettingCategoryDefinition[]> { return getJSON('/api/settings/list_definitions', { component }).then( r => r.definitions, throwGlobalError @@ -32,12 +33,12 @@ export function getDefinitions(component?: string): Promise<T.SettingCategoryDef export function getValues( data: { keys: string; component?: string } & BranchParameters -): Promise<T.SettingValue[]> { +): Promise<SettingValue[]> { return getJSON('/api/settings/values', data).then(r => r.settings); } export function setSettingValue( - definition: T.SettingDefinition, + definition: SettingDefinition, value: any, component?: string ): Promise<void> { |