remove SshKey interface and change object type
[arvados-workbench2.git] / src / store / auth / auth-reducer.ts
index 8a30a2a6805f1548cbac4c113ac2a3a4c60822b9..8f234dad35bf8a9d68f508ab47d4a1166eea454e 100644 (file)
@@ -5,12 +5,12 @@
 import { authActions, AuthAction } from "./auth-action";
 import { User } from "~/models/user";
 import { ServiceRepository } from "~/services/services";
-import { SshKey } from '~/models/ssh-key';
+import { SshKeyResource } from '~/models/ssh-key';
 
 export interface AuthState {
     user?: User;
     apiToken?: string;
-    sshKeys?: SshKey[];
+    sshKeys?: SshKeyResource[];
 }
 
 const initialState: AuthState = {
@@ -36,10 +36,10 @@ export const authReducer = (services: ServiceRepository) => (state: AuthState =
         USER_DETAILS_SUCCESS: (user: User) => {
             return {...state, user};
         },
-        SET_SSH_KEYS: (sshKeys: SshKey[]) => {
+        SET_SSH_KEYS: (sshKeys: SshKeyResource[]) => {
             return {...state, sshKeys};
         },
-        ADD_SSH_KEY: (sshKey: SshKey) => {
+        ADD_SSH_KEY: (sshKey: SshKeyResource) => {
             return { ...state, sshKeys: state.sshKeys!.concat(sshKey) };
         },
         default: () => state