Use request.CTX instead of *request.Context (#24877)

* Use request.CTX instead of *request.Context

* Fix tests
Этот коммит содержится в:
Ben Schumacher
2023-10-30 16:33:37 +01:00
коммит произвёл GitHub
родитель 37dc35c1a1
Коммит c7461751f2
106 изменённых файлов: 612 добавлений и 613 удалений

Просмотреть файл

@@ -14,7 +14,7 @@ import (
"github.com/mattermost/mattermost/server/public/shared/request"
)
func (a *App) SaveReactionForPost(c *request.Context, reaction *model.Reaction) (*model.Reaction, *model.AppError) {
func (a *App) SaveReactionForPost(c request.CTX, reaction *model.Reaction) (*model.Reaction, *model.AppError) {
post, err := a.GetSinglePost(reaction.PostId, false)
if err != nil {
return nil, err
@@ -100,7 +100,7 @@ func populateEmptyReactions(postIDs []string, reactions map[string][]*model.Reac
return reactions
}
func (a *App) DeleteReactionForPost(c *request.Context, reaction *model.Reaction) *model.AppError {
func (a *App) DeleteReactionForPost(c request.CTX, reaction *model.Reaction) *model.AppError {
post, err := a.GetSinglePost(reaction.PostId, false)
if err != nil {
return err