增加消息管理

This commit is contained in:
GoEdgeLab
2020-10-20 20:18:12 +08:00
parent 957b5b620c
commit 10faba32ea
15 changed files with 274 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
package messages
import (
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
)
type ReadPageAction struct {
actionutils.ParentAction
}
func (this *ReadPageAction) RunPost(params struct {
MessageIds []int64
}) {
_, err := this.RPC().MessageRPC().UpdateMessagesRead(this.AdminContext(), &pb.UpdateMessagesReadRequest{
MessageIds: params.MessageIds,
IsRead: true,
})
if err != nil {
this.ErrorPage(err)
return
}
this.Success()
}