瀏覽代碼

fix: showing error on add ssh modal

pull/56/head
Tyler Chen 4 年之前
父節點
當前提交
8fb4e1c29e
共有 2 個文件被更改,包括 15 次插入2 次删除
  1. +7
    -0
      src/_components/modals/AddSshKey.vue
  2. +8
    -2
      src/_store/users.module.js

+ 7
- 0
src/_components/modals/AddSshKey.vue 查看文件

@@ -134,6 +134,13 @@ export default {

show() {
this.$modal.show('add-ssh-key');

this.name = '';
this.sshPublicKey = '';
this.minExpiration = new Date().toISOString();
this.expiration = null;
this.timezone = this.detectedTimezone.timeZoneId;
this.submitted = false;
},
hide() {
this.$modal.hide('add-ssh-key');


+ 8
- 2
src/_store/users.module.js 查看文件

@@ -144,8 +144,14 @@ const actions = {
commit('addSshKeyByUserIdRequest');
return userService.addSshKeyByUserId(userId, sshKey, messages, errors)
.then(
key => commit('addSshKeyByUserIdSuccess', key),
error => commit('addSshKeyByUserIdFailure', error)
key => {
commit('addSshKeyByUserIdSuccess', key);
return Promise.resolve();
},
error => {
commit('addSshKeyByUserIdFailure', error);
return Promise.reject();
}
);
},



Loading…
取消
儲存