MM-49564: Drafts upsert in the Store vs App layer (#22530)
* MM-49564: Upsert in the Store vs App layer Refactor drafts so that Upserting a draft would happen in the DB and not in the app layer. * Fixes mocks * Fixes tests * Fixes translations * Fixes tests * Update tests * Fixes tests * Addresses review comments - renames Save => Upsert - removes Sleep from tests * Fixes flaky test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
@@ -985,11 +985,10 @@ type PostPriorityStore interface {
|
||||
}
|
||||
|
||||
type DraftStore interface {
|
||||
Save(d *model.Draft) (*model.Draft, error)
|
||||
Upsert(d *model.Draft) (*model.Draft, error)
|
||||
Get(userID, channelID, rootID string, includeDeleted bool) (*model.Draft, error)
|
||||
Delete(userID, channelID, rootID string) error
|
||||
GetDraftsForUser(userID, teamID string) ([]*model.Draft, error)
|
||||
Update(d *model.Draft) (*model.Draft, error)
|
||||
}
|
||||
|
||||
type PostAcknowledgementStore interface {
|
||||
|
||||
Ссылка в новой задаче
Block a user