17782: Fixes almost all tests (4 left) mostly by fixing namespace-type imports.
[arvados-workbench2.git] / src / services / link-account-service / link-account-service.ts
index ebae69ac37da2216d3f91aa1a2abc9017837ce77..6c03eed5b9a05b387cd94053bad294e54e795121 100644 (file)
@@ -3,9 +3,9 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { AxiosInstance } from "axios";
-import { ApiActions } from "~/services/api/api-actions";
-import { AccountToLink, LinkAccountStatus } from "~/models/link-account";
-import { CommonService } from "~/services/common-service/common-service";
+import { ApiActions } from "services/api/api-actions";
+import { AccountToLink, LinkAccountStatus } from "models/link-account";
+import { CommonService } from "services/common-service/common-service";
 
 export const USER_LINK_ACCOUNT_KEY = 'accountToLink';
 export const ACCOUNT_LINK_STATUS_KEY = 'accountLinkStatus';
@@ -16,15 +16,15 @@ export class LinkAccountService {
         protected serverApi: AxiosInstance,
         protected actions: ApiActions) { }
 
-    public saveToSession(account: AccountToLink) {
+    public saveAccountToLink(account: AccountToLink) {
         sessionStorage.setItem(USER_LINK_ACCOUNT_KEY, JSON.stringify(account));
     }
 
-    public removeFromSession() {
+    public removeAccountToLink() {
         sessionStorage.removeItem(USER_LINK_ACCOUNT_KEY);
     }
 
-    public getFromSession() {
+    public getAccountToLink() {
         const data = sessionStorage.getItem(USER_LINK_ACCOUNT_KEY);
         return data ? JSON.parse(data) as AccountToLink : undefined;
     }
@@ -49,9 +49,9 @@ export class LinkAccountService {
             redirect_to_new_user: true
         };
         return CommonService.defaultResponse(
-            this.serverApi.post('/users/merge/', params),
+            this.serverApi.post('/users/merge', params),
             this.actions,
             false
         );
     }
-}
\ No newline at end of file
+}