Feature/v2.8.0 (#231)

支持Imap协议
升级所有依赖
修复部分bug
This commit is contained in:
Jinnrry authored and GitHub committed 2025-01-04 16:23:07 +08:00
1 parent 6697d2b229
commit 5af46b32f6
82 files changed
+4149 -345

No files matched your search

+2 -2
View File
@@ -11,8 +11,8 @@ import (
)
type emailDeleteRequest struct {
IDs []int64 `json:"ids"`
ForcedDel bool `json:"forcedDel"`
IDs []int `json:"ids"`
ForcedDel bool `json:"forcedDel"`
}
func EmailDelete(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
+1 -8
View File
@@ -2,11 +2,9 @@ package controllers
import (
"encoding/json"
"github.com/Jinnrry/pmail/db"
"github.com/Jinnrry/pmail/dto"
"github.com/Jinnrry/pmail/dto/response"
"github.com/Jinnrry/pmail/i18n"
"github.com/Jinnrry/pmail/models"
"github.com/Jinnrry/pmail/services/group"
"github.com/Jinnrry/pmail/utils/array"
"github.com/Jinnrry/pmail/utils/context"
@@ -67,13 +65,8 @@ func AddGroup(ctx *context.Context, w http.ResponseWriter, req *http.Request) {
log.WithContext(ctx).Errorf("%+v", err)
}
var newGroup models.Group = models.Group{
Name: reqData.Name,
ParentId: reqData.ParentId,
UserId: ctx.UserID,
}
newGroup, err := group.CreateGroup(ctx, reqData.Name, reqData.ParentId)
_, err = db.Instance.Insert(&newGroup)
if err != nil {
response.NewErrorResponse(response.ServerError, "DBError", err.Error()).FPrint(w)
return