(c *context.Context)
| 506 | } |
| 507 | |
| 508 | func SettingsTwoFactorDisable(c *context.Context) { |
| 509 | if !database.Handle.TwoFactors().IsEnabled(c.Req.Context(), c.User.ID) { |
| 510 | c.NotFound() |
| 511 | return |
| 512 | } |
| 513 | |
| 514 | if err := database.DeleteTwoFactor(c.UserID()); err != nil { |
| 515 | c.Errorf(err, "delete two factor") |
| 516 | return |
| 517 | } |
| 518 | |
| 519 | c.Flash.Success(c.Tr("settings.two_factor_disable_success")) |
| 520 | c.JSONSuccess(map[string]any{ |
| 521 | "redirect": conf.Server.Subpath + "/user/settings/security", |
| 522 | }) |
| 523 | } |
| 524 | |
| 525 | func SettingsRepos(c *context.Context) { |
| 526 | c.Title("settings.repos") |
nothing calls this directly
no test coverage detected