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.

20 lines
570 B

  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. }
  9. func (s *EmailRouter) InitEmailRouter(Router *gin.RouterGroup) {
  10. emailRouter := Router.Use(middleware.OperationRecord())
  11. var EmailApi = api.ApiGroupApp.EmailApi.EmailTest
  12. var SendEmail = api.ApiGroupApp.EmailApi.SendEmail
  13. {
  14. emailRouter.POST("emailTest", EmailApi) // 发送测试邮件
  15. emailRouter.POST("sendEmail", SendEmail) // 发送邮件
  16. }
  17. }