forked from forgejo/forgejo
Rename ctx.Form() to ctx.FormString() and move code into own file (#16571)
Followup from #16562 prepare for #16567 * Rename ctx.Form() to ctx.FormString() * Reimplement FormX func to need less code and cpu cycles * Move code into own file
This commit is contained in:
parent
2eeae4edb6
commit
c4d70a0325
64 changed files with 236 additions and 449 deletions
|
@ -193,7 +193,7 @@ func KeysPost(ctx *context.Context) {
|
|||
// DeleteKey response for delete user's SSH/GPG key
|
||||
func DeleteKey(ctx *context.Context) {
|
||||
|
||||
switch ctx.Form("type") {
|
||||
switch ctx.FormString("type") {
|
||||
case "gpg":
|
||||
if err := models.DeleteGPGKey(ctx.User, ctx.FormInt64("id")); err != nil {
|
||||
ctx.Flash.Error("DeleteGPGKey: " + err.Error())
|
||||
|
@ -265,5 +265,5 @@ func loadKeysData(ctx *context.Context) {
|
|||
}
|
||||
ctx.Data["Principals"] = principals
|
||||
|
||||
ctx.Data["VerifyingID"] = ctx.Form("verify_gpg")
|
||||
ctx.Data["VerifyingID"] = ctx.FormString("verify_gpg")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue