JM-WechatMini/plugin/email/router/sys_email.go
2023-11-02 04:34:46 +08:00

20 lines
484 B
Go

package router
import (
"github.com/gin-gonic/gin"
"miniapp/middleware"
"miniapp/plugin/email/api"
)
type EmailRouter struct{}
func (s *EmailRouter) InitEmailRouter(Router *gin.RouterGroup) {
emailRouter := Router.Use(middleware.OperationRecord())
EmailApi := api.ApiGroupApp.EmailApi.EmailTest
SendEmail := api.ApiGroupApp.EmailApi.SendEmail
{
emailRouter.POST("emailTest", EmailApi) // 发送测试邮件
emailRouter.POST("sendEmail", SendEmail) // 发送邮件
}
}