From e673a058c995392b3ad6cbab91a9571bed29a57b Mon Sep 17 00:00:00 2001 From: Ashwin Sharma Date: Thu, 30 Jul 2020 16:05:02 +0000 Subject: Clamp react ui to use url pathname dynamically instead of hardcoded prefix for calling apis Issue-ID: CLAMP-914 Signed-off-by: Ashwin Sharma Change-Id: I266aeafe9a543e95bcb96fcab6437227c148f8c4 --- ui-react/src/api/UserService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui-react/src/api/UserService.js') diff --git a/ui-react/src/api/UserService.js b/ui-react/src/api/UserService.js index 477ca4269..5fb4aa6b4 100644 --- a/ui-react/src/api/UserService.js +++ b/ui-react/src/api/UserService.js @@ -24,7 +24,7 @@ export default class UserService { static notLoggedUserName='Anonymous'; static login() { - return fetch('/restservices/clds/v1/user/getUser', { + return fetch(window.location.pathname + 'restservices/clds/v1/user/getUser', { method: 'GET', credentials: 'same-origin' }) @@ -49,7 +49,7 @@ export default class UserService { } static getUserInfo() { - return fetch('/restservices/clds/v2/clampInformation', { + return fetch(window.location.pathname + 'restservices/clds/v2/clampInformation', { method: 'GET', credentials: 'same-origin' }) -- cgit 1.2.3-korg