From 062adbed8a8a9cb83cd172b5a6e232e75af89f2d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 20 Aug 2015 17:11:29 +0800 Subject: add confirmation to delete ssh key --- cmd/web.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cmd') 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) -- cgit v1.2.3