(e *core.RequestEvent)
| 98 | } |
| 99 | |
| 100 | func settingsTestEmail(e *core.RequestEvent) error { |
| 101 | form := forms.NewTestEmailSend(e.App) |
| 102 | |
| 103 | // load request |
| 104 | if err := e.BindBody(form); err != nil { |
| 105 | return e.BadRequestError("An error occurred while loading the submitted data.", err) |
| 106 | } |
| 107 | |
| 108 | // send |
| 109 | if err := form.Submit(); err != nil { |
| 110 | // form error |
| 111 | if fErr, ok := err.(validation.Errors); ok { |
| 112 | return e.BadRequestError("Failed to send the test email.", fErr) |
| 113 | } |
| 114 | |
| 115 | // mailer error |
| 116 | return e.BadRequestError("Failed to send the test email. Raw error: \n"+err.Error(), nil) |
| 117 | } |
| 118 | |
| 119 | return e.NoContent(http.StatusNoContent) |
| 120 | } |
| 121 | |
| 122 | func settingsGenerateAppleClientSecret(e *core.RequestEvent) error { |
| 123 | form := forms.NewAppleClientSecretCreate(e.App) |
nothing calls this directly
no test coverage detected
searching dependent graphs…