aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers
diff options
context:
space:
mode:
authorStas Vilchik <stas.vilchik@sonarsource.com>2017-08-28 11:43:35 +0200
committerJanos Gyerik <janos.gyerik@sonarsource.com>2017-09-12 11:34:54 +0200
commit25140ec8ed74cc5ea5f50f05325f0d4a7f8753fd (patch)
tree3bfcb2944b2a6150eef40638db25004322cbfd98 /server/sonar-web/src/main/js/helpers
parent030370cf6255d1185ecb3deeaab7de1fe76e058b (diff)
downloadsonarqube-25140ec8ed74cc5ea5f50f05325f0d4a7f8753fd.tar.gz
sonarqube-25140ec8ed74cc5ea5f50f05325f0d4a7f8753fd.zip
SONAR-9756 Build UI for branch management (#2433)
Diffstat (limited to 'server/sonar-web/src/main/js/helpers')
-rw-r--r--server/sonar-web/src/main/js/helpers/request.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/helpers/request.ts b/server/sonar-web/src/main/js/helpers/request.ts
index 4bac03dadd6..1acb519e000 100644
--- a/server/sonar-web/src/main/js/helpers/request.ts
+++ b/server/sonar-web/src/main/js/helpers/request.ts
@@ -170,10 +170,10 @@ export function postJSON(url: string, data?: RequestData): Promise<any> {
* Shortcut to do a POST request
*/
export function post(url: string, data?: RequestData): Promise<void> {
- return new Promise(resolve => {
+ return new Promise((resolve, reject) => {
request(url).setMethod('POST').setData(data).submit().then(checkStatus).then(() => {
resolve();
- });
+ }, reject);
});
}