diff options
author | Unknwon <u@gogs.io> | 2015-08-20 17:11:29 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-20 17:11:29 +0800 |
commit | 062adbed8a8a9cb83cd172b5a6e232e75af89f2d (patch) | |
tree | 07a35a3c9dca8d1be54614b006b7c0487a9cdb62 /cmd | |
parent | 9b01a3501b8c1897a9c02bf82dcc169a20b9a51f (diff) | |
download | gitea-062adbed8a8a9cb83cd172b5a6e232e75af89f2d.tar.gz gitea-062adbed8a8a9cb83cd172b5a6e232e75af89f2d.zip |
add confirmation to delete ssh key
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go index 94c0a6a99d..b25bca84f4 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -272,8 +272,9 @@ func runWeb(ctx *cli.Context) { m.Post("/email", bindIgnErr(auth.AddEmailForm{}), user.SettingsEmailPost) m.Get("/password", user.SettingsPassword) m.Post("/password", bindIgnErr(auth.ChangePasswordForm{}), user.SettingsPasswordPost) - m.Get("/ssh", user.SettingsSSHKeys) - m.Post("/ssh", bindIgnErr(auth.AddSSHKeyForm{}), user.SettingsSSHKeysPost) + m.Combo("/ssh").Get(user.SettingsSSHKeys). + Post(bindIgnErr(auth.AddSSHKeyForm{}), user.SettingsSSHKeysPost) + m.Post("/ssh/delete", user.DeleteSSHKey) m.Get("/social", user.SettingsSocial) m.Combo("/applications").Get(user.SettingsApplications). Post(bindIgnErr(auth.NewAccessTokenForm{}), user.SettingsApplicationsPost) |