Compare commits
2 Commits
f59eca6724
...
1e904b7361
Author | SHA1 | Date | |
---|---|---|---|
|
1e904b7361 | ||
|
8ed0f12fb4 |
@ -29,9 +29,6 @@ func wsStoreAddKey(req *restful.Request, resp *restful.Response) {
|
||||
return
|
||||
}
|
||||
|
||||
secStore.AddKey(np.Name, np.Passphrase)
|
||||
defer updateState()
|
||||
|
||||
for _, k := range secStore.Keys {
|
||||
if k.Name == np.Name {
|
||||
wsBadRequest(resp, "there's already a passphrase named "+strconv.Quote(np.Name))
|
||||
@ -39,6 +36,9 @@ func wsStoreAddKey(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
}
|
||||
|
||||
secStore.AddKey(np.Name, np.Passphrase)
|
||||
defer updateState()
|
||||
|
||||
err = secStore.SaveTo(secKeysStorePath())
|
||||
if err != nil {
|
||||
wsError(resp, err)
|
||||
|
@ -79,6 +79,8 @@ createApp({
|
||||
})
|
||||
},
|
||||
storeDelKey() {
|
||||
event.preventDefault()
|
||||
|
||||
let name = this.forms.delKey.name
|
||||
|
||||
if (!confirm("Remove key named "+JSON.stringify(name)+"?")) {
|
||||
|
Loading…
Reference in New Issue
Block a user