aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api
diff options
context:
space:
mode:
authorJay <jeremy.davis@sonarsource.com>2021-02-24 14:19:10 +0100
committersonartech <sonartech@sonarsource.com>2021-02-26 20:07:40 +0000
commit8a34c0093e84fbdc50afd2d864db7f9ced8d6e46 (patch)
tree5ff886122cad12545c5005bcb0b81caccb12943c /server/sonar-web/src/main/js/api
parent10fef4f93aeefcf8d79e7eb93742d4460c75d90b (diff)
downloadsonarqube-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.ts7
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> {