X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6bdb4758d981aa05c19700761d3ace0db7af324a..8e2f0bc7db026f646c3c08bc10fe4897bda7bdd8:/src/store/auth/auth-action-ssh.ts diff --git a/src/store/auth/auth-action-ssh.ts b/src/store/auth/auth-action-ssh.ts index 27a5c52d..3ba5f3a9 100644 --- a/src/store/auth/auth-action-ssh.ts +++ b/src/store/auth/auth-action-ssh.ts @@ -2,20 +2,20 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { dialogActions } from "~/store/dialog/dialog-actions"; +import { dialogActions } from "store/dialog/dialog-actions"; import { Dispatch } from "redux"; -import { RootState } from "~/store/store"; -import { getUserUuid } from "~/common/getuser"; -import { ServiceRepository } from "~/services/services"; -import { snackbarActions, SnackbarKind } from "~/store/snackbar/snackbar-actions"; +import { RootState } from "store/store"; +import { getUserUuid } from "common/getuser"; +import { ServiceRepository } from "services/services"; +import { snackbarActions, SnackbarKind } from "store/snackbar/snackbar-actions"; import { FormErrors, reset, startSubmit, stopSubmit } from "redux-form"; -import { KeyType } from "~/models/ssh-key"; +import { KeyType } from "models/ssh-key"; import { AuthorizedKeysServiceError, getAuthorizedKeysServiceError -} from "~/services/authorized-keys-service/authorized-keys-service"; -import { setBreadcrumbs } from "~/store/breadcrumbs/breadcrumbs-actions"; -import { authActions } from "~/store/auth/auth-action"; +} from "services/authorized-keys-service/authorized-keys-service"; +import { setBreadcrumbs } from "store/breadcrumbs/breadcrumbs-actions"; +import { authActions } from "store/auth/auth-action"; export const SSH_KEY_CREATE_FORM_NAME = 'sshKeyCreateFormName'; export const SSH_KEY_PUBLIC_KEY_DIALOG = 'sshKeyPublicKeyDialog'; @@ -62,6 +62,7 @@ export const removeSshKey = (uuid: string) => export const createSshKey = (data: SshKeyCreateFormDialogData) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const userUuid = getUserUuid(getState()); + if (!userUuid) { return; } const { name, publicKey } = data; dispatch(startSubmit(SSH_KEY_CREATE_FORM_NAME)); try {