This commit is contained in:
aozhiwei 2024-02-12 13:24:46 +08:00
parent a0da08d125
commit bd71f93c53
2 changed files with 13 additions and 6 deletions

View File

@ -11,11 +11,11 @@ type ControllerMgr struct {
func (this* ControllerMgr) Init() {
f5.GetApp().GetGinEngine().Use(middleware.CaForward, middleware.CaAuth)
f5.GetApp().RegisterCaHandle("mail", "getMailList", mail_getMail)
f5.GetApp().RegisterCaHandle("mail", "markMail", mail_markMail)
f5.GetApp().RegisterCaHandle("mail", "getUnreadMailCnt", mail_getUnreadMailCnt)
f5.GetApp().RegisterCaHandle("mail", "getAttachment", mail_getAttachment)
f5.GetApp().RegisterCaHandle("mail", "deleteMails", mail_deleteMails)
f5.GetApp().RegisterCaHandle("Mail", "getMailList", mail_getMail)
f5.GetApp().RegisterCaHandle("Mail", "markMail", mail_markMail)
f5.GetApp().RegisterCaHandle("Mail", "getUnreadMailCnt", mail_getUnreadMailCnt)
f5.GetApp().RegisterCaHandle("Mail", "getAttachment", mail_getAttachment)
f5.GetApp().RegisterCaHandle("Mail", "deleteMails", mail_deleteMails)
}
func (this* ControllerMgr) UnInit() {

View File

@ -1,11 +1,18 @@
package controller
import (
"net/http"
"github.com/gin-gonic/gin"
)
func mail_getMail(c *gin.Context) {
var msg struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}
msg.ErrCode = 0
msg.ErrMsg = ""
c.JSON(http.StatusOK, msg)
}
func mail_markMail(c *gin.Context) {