(w http.ResponseWriter, req *http.Request)
| 185 | } |
| 186 | |
| 187 | func (a *API) requireEmailProvider(w http.ResponseWriter, req *http.Request) (context.Context, error) { |
| 188 | ctx := req.Context() |
| 189 | config := a.getConfig(ctx) |
| 190 | |
| 191 | if config.External.Email.Disabled { |
| 192 | return nil, badRequestError("Unsupported email provider") |
| 193 | } |
| 194 | |
| 195 | return ctx, nil |
| 196 | } |
nothing calls this directly
no test coverage detected