* 插件架构改造

* v2.4.0
This commit is contained in:
Jinnrry authored and GitHub committed 2024-03-01 19:10:56 +08:00
1 parent d358812afb
commit 20f3590a04
26 files changed
+629 -128

No files matched your search

+3 -2
View File
@@ -11,6 +11,7 @@ import (
"pmail/dto/parsemail"
"pmail/dto/response"
"pmail/hooks"
"pmail/hooks/framework"
"pmail/i18n"
"pmail/utils/async"
"pmail/utils/context"
@@ -134,7 +135,7 @@ func Send(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
continue
}
as.WaitProcess(func(hk any) {
hk.(hooks.EmailHook).SendBefore(ctx, e)
hk.(framework.EmailHook).SendBefore(ctx, e)
}, hook)
}
as.Wait()
@@ -180,7 +181,7 @@ func Send(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
continue
}
as2.WaitProcess(func(hk any) {
hk.(hooks.EmailHook).SendAfter(ctx, e, sendErr)
hk.(framework.EmailHook).SendAfter(ctx, e, sendErr)
}, hook)
}
as2.Wait()