mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-25 03:00:25 +08:00
增加消息管理
This commit is contained in:
25
internal/web/actions/default/messages/readPage.go
Normal file
25
internal/web/actions/default/messages/readPage.go
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user