You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
562 B

3 years ago
3 years ago
  1. package router
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  4. "github.com/flipped-aurora/gin-vue-admin/server/plugin/email/api"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type EmailRouter struct{}
  8. func (s *EmailRouter) InitEmailRouter(Router *gin.RouterGroup) {
  9. emailRouter := Router.Use(middleware.OperationRecord())
  10. EmailApi := api.ApiGroupApp.EmailApi.EmailTest
  11. SendEmail := api.ApiGroupApp.EmailApi.SendEmail
  12. {
  13. emailRouter.POST("emailTest", EmailApi) // 发送测试邮件
  14. emailRouter.POST("sendEmail", SendEmail) // 发送邮件
  15. }
  16. }