summaryrefslogtreecommitdiffstats
path: root/ui-react/src/api/UserService.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-02-23 09:31:04 -0800
committersebdet <sebastien.determe@intl.att.com>2020-02-25 06:49:46 -0800
commit7658007d67c5c2bc1d81bff4bf972b315cb5bea6 (patch)
treee44324c6dd8a1d653a59d3458a5c38116f25b86a /ui-react/src/api/UserService.js
parentaa486be66b1c29ad2e953cb44d105ca1bde40b1c (diff)
Simplify the user management
Simplify the user management and fix a bug in the server, crashing when no user are logged and an operation is requested, and also previous user still stored in the securitycontext when admin is logged (due to static variable) Issue-ID: CLAMP-651 Change-Id: I57523bc2c3afaf5ca5a3acf5c59823df06fd4cd9 Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/api/UserService.js')
-rw-r--r--ui-react/src/api/UserService.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui-react/src/api/UserService.js b/ui-react/src/api/UserService.js
index 8da6e3a71..5703fdcc7 100644
--- a/ui-react/src/api/UserService.js
+++ b/ui-react/src/api/UserService.js
@@ -74,7 +74,7 @@ export default class UserService {
}
static getUserInfo() {
- return fetch('/restservices/clds/v1/clds/cldsInfo', {
+ return fetch('/restservices/clds/v2/clampInformation', {
method: 'GET',
credentials: 'same-origin'
})
@@ -82,6 +82,8 @@ export default class UserService {
console.debug("getUserInfo response received, status code:", response.status);
if (response.ok) {
return response.json();
+ } else {
+ return {}
}
})
.then(function (data) {
@@ -91,7 +93,7 @@ export default class UserService {
.catch(function(error) {
console.warn("getUserInfo error received, user set to: ",UserService.notLoggedUserName);
console.error("getUserInfo error:",error);
- return;
+ return {};
});
}
}