diff --git a/ui/src/app/account/service/account.service.ts b/ui/src/app/account/service/account.service.ts index 6fecdcc8f..c8cb970dc 100644 --- a/ui/src/app/account/service/account.service.ts +++ b/ui/src/app/account/service/account.service.ts @@ -28,7 +28,7 @@ export class AccountService { console.log('Fetching account data from the back end') return this.http - .get(SERVER_API_URL + '/services/userservice/api/account', { + .get('/services/userservice/api/account', { observe: 'response', }) .pipe( @@ -69,19 +69,19 @@ export class AccountService { } getMfaSetup(): Observable> { - return this.http.get(SERVER_API_URL + 'services/userservice/api/account/mfa', { observe: 'response' }) + return this.http.get('/services/userservice/api/account/mfa', { observe: 'response' }) } save(account: any): Observable> { - return this.http.post(SERVER_API_URL + 'services/userservice/api/account', account, { observe: 'response' }) + return this.http.post('/services/userservice/api/account', account, { observe: 'response' }) } enableMfa(mfaSetup: any): Observable> { - return this.http.post(SERVER_API_URL + 'services/userservice/api/account/mfa/on', mfaSetup, { observe: 'response' }) + return this.http.post('/services/userservice/api/account/mfa/on', mfaSetup, { observe: 'response' }) } disableMfa(): Observable> { - return this.http.post(SERVER_API_URL + 'services/userservice/api/account/mfa/off', null, { observe: 'response' }) + return this.http.post('/services/userservice/api/account/mfa/off', null, { observe: 'response' }) } // TODO: any - this seems to only be used for logging out (only ever receives null as arg) authenticate(identity: any) {