Procházet zdrojové kódy

fix: showing error on add ssh modal

pull/56/head
Tyler Chen před 4 roky
rodič
revize
8fb4e1c29e
2 změnil soubory, kde provedl 15 přidání a 2 odebrání
  1. +7
    -0
      src/_components/modals/AddSshKey.vue
  2. +8
    -2
      src/_store/users.module.js

+ 7
- 0
src/_components/modals/AddSshKey.vue Zobrazit soubor

@@ -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 Zobrazit soubor

@@ -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();
}
);
},



Načítá se…
Zrušit
Uložit