fix: HttpHandler needs a Result struct
This commit is contained in:
parent
57516a2f4a
commit
4348ff6dfe
|
@ -97,7 +97,13 @@ type HttpHandlerParams struct {
|
||||||
Protocol *protocols.S5Protocol
|
Protocol *protocols.S5Protocol
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewHttpHandler(params HttpHandlerParams) *HttpHandler {
|
type HttpHandlerResult struct {
|
||||||
|
fx.Out
|
||||||
|
|
||||||
|
HttpHandler *HttpHandler
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewHttpHandler(params HttpHandlerParams) (HttpHandlerResult, error) {
|
||||||
verifier := emailverifier.NewVerifier()
|
verifier := emailverifier.NewVerifier()
|
||||||
|
|
||||||
verifier.DisableSMTPCheck()
|
verifier.DisableSMTPCheck()
|
||||||
|
@ -105,7 +111,8 @@ func NewHttpHandler(params HttpHandlerParams) *HttpHandler {
|
||||||
verifier.DisableDomainSuggest()
|
verifier.DisableDomainSuggest()
|
||||||
verifier.DisableAutoUpdateDisposable()
|
verifier.DisableAutoUpdateDisposable()
|
||||||
|
|
||||||
return &HttpHandler{
|
return HttpHandlerResult{
|
||||||
|
HttpHandler: &HttpHandler{
|
||||||
verifier: verifier,
|
verifier: verifier,
|
||||||
config: params.Config,
|
config: params.Config,
|
||||||
logger: params.Logger,
|
logger: params.Logger,
|
||||||
|
@ -113,7 +120,8 @@ func NewHttpHandler(params HttpHandlerParams) *HttpHandler {
|
||||||
db: params.Db,
|
db: params.Db,
|
||||||
accounts: params.Accounts,
|
accounts: params.Accounts,
|
||||||
protocol: params.Protocol,
|
protocol: params.Protocol,
|
||||||
}
|
},
|
||||||
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *HttpHandler) SmallFileUpload(jc jape.Context) {
|
func (h *HttpHandler) SmallFileUpload(jc jape.Context) {
|
||||||
|
|
Loading…
Reference in New Issue