mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
settings: add email test note
just send an announcement to yourself.
This commit is contained in:
@@ -79,6 +79,13 @@ func GenericErr(status int, err error) error {
|
||||
}
|
||||
}
|
||||
|
||||
func GenericErrFromResponse(resp *http.Response, err error) error {
|
||||
if resp == nil {
|
||||
return ErrUnknown{code: -2}
|
||||
}
|
||||
return GenericErr(resp.StatusCode, err)
|
||||
}
|
||||
|
||||
type ConfigurableTransport interface {
|
||||
// SetTransport sets the http.Transport to use for requests. Can be used to set a proxy.
|
||||
SetTransport(t *http.Transport)
|
||||
|
||||
@@ -720,6 +720,12 @@ sections:
|
||||
type: bool
|
||||
value: false
|
||||
description: Disables using the same address on multiple accounts.
|
||||
- setting: test_note
|
||||
name: 'Test your settings:'
|
||||
type: note
|
||||
depends_true: enabled
|
||||
required: false
|
||||
description: Go over to the accounts tab, select your user (ensuring you've assigned it an email address) and send yourself an announcement.
|
||||
- section: mailgun
|
||||
meta:
|
||||
name: Mailgun (Email)
|
||||
|
||||
@@ -87,7 +87,7 @@ func (js *Jellyseerr) req(mode string, uri string, data any, queryParams url.Val
|
||||
}
|
||||
}
|
||||
resp, err := js.httpClient.Do(req)
|
||||
err = co.GenericErr(resp.StatusCode, err)
|
||||
err = co.GenericErrFromResponse(resp, err)
|
||||
defer js.timeoutHandler()
|
||||
var responseText string
|
||||
defer resp.Body.Close()
|
||||
|
||||
Reference in New Issue
Block a user