(c echo.Context, app storage.App)
| 445 | } |
| 446 | |
| 447 | func set2FA(c echo.Context, app storage.App) error { |
| 448 | job, ok := storage.Jobs.GetByAppId(app.GetId()) |
| 449 | if !ok { |
| 450 | return errors.New("no job found for app " + app.GetId()) |
| 451 | } |
| 452 | job.TwoFactorCode.Store(c.FormValue("formToken")) |
| 453 | return c.Redirect(302, "/") |
| 454 | } |
| 455 | |
| 456 | func deleteApp(c echo.Context, app storage.App) error { |
| 457 | if err := storage.Apps.Delete(app.GetId()); err != nil { |
nothing calls this directly
no test coverage detected