MCPcopy Create free account
hub / github.com/gogs/gogs / SettingsSSHKeys

Function SettingsSSHKeys

internal/route/user/setting.go:318–330  ·  view source on GitHub ↗
(c *context.Context)

Source from the content-addressed store, hash-verified

316}
317
318func SettingsSSHKeys(c *context.Context) {
319 c.Title("settings.ssh_keys")
320 c.PageIs("SettingsSSHKeys")
321
322 keys, err := database.ListPublicKeys(c.User.ID)
323 if err != nil {
324 c.Errorf(err, "list public keys")
325 return
326 }
327 c.Data["Keys"] = keys
328
329 c.Success(tmplUserSettingsSSHKeys)
330}
331
332func SettingsSSHKeysPost(c *context.Context, f form.AddSSHKey) {
333 c.Title("settings.ssh_keys")

Callers

nothing calls this directly

Calls 5

ListPublicKeysFunction · 0.92
TitleMethod · 0.80
PageIsMethod · 0.80
SuccessMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected