Replace the direct URL with config's one

To be customizable URL should be placed to "config"

Fixes: https://pagure.io/freeipa/issue/7621
Reviewed-By: Serhii Tsymbaliuk <stsymbal@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Stanislav Levin
2018-07-06 13:24:04 +03:00
committed by Serhii Tsymbaliuk
parent 13000e2f19
commit adfd82ee74
2 changed files with 9 additions and 2 deletions

View File

@@ -70,6 +70,11 @@ define([
*/
reset_psw_url: '/ipa/session/change_password',
/**
* token synchronization url
*/
token_sync_url: '/ipa/session/sync_token',
/**
* Ajax options for RPC commands
*/

View File

@@ -27,6 +27,7 @@ define(['dojo/_base/declare',
'dojo/on',
'../ipa',
'../auth',
'../config',
'../reg',
'../FieldBinder',
'../text',
@@ -34,7 +35,8 @@ define(['dojo/_base/declare',
'./LoginScreenBase'
],
function(declare, Deferred, construct, dom_style, query, topic, on,
IPA, auth, reg, FieldBinder, text, util, LoginScreenBase) {
IPA, auth, config, reg, FieldBinder, text, util,
LoginScreenBase) {
/**
@@ -156,7 +158,7 @@ define(['dojo/_base/declare',
};
var request = {
url: '/ipa/session/sync_token',
url: config.token_sync_url,
data: data,
contentType: 'application/x-www-form-urlencoded',
processData: true,