[MM-44168] Add feature to restore archived user groups (#20369)
* Add undelete feature, add mocks, tests * Rename undelete->restore * make store-layers * make app-layers * Store -> Store() * Lint fixes Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
17332035fa
Коммит
5be8557247
@@ -4101,6 +4101,22 @@ func (s *TimerLayerGroupStore) PermittedSyncableAdmins(syncableID string, syncab
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerGroupStore) Restore(groupID string) (*model.Group, error) {
|
||||
start := time.Now()
|
||||
|
||||
result, err := s.GroupStore.Restore(groupID)
|
||||
|
||||
elapsed := float64(time.Since(start)) / float64(time.Second)
|
||||
if s.Root.Metrics != nil {
|
||||
success := "false"
|
||||
if err == nil {
|
||||
success = "true"
|
||||
}
|
||||
s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.Restore", success, elapsed)
|
||||
}
|
||||
return result, err
|
||||
}
|
||||
|
||||
func (s *TimerLayerGroupStore) TeamMembersMinusGroupMembers(teamID string, groupIDs []string, page int, perPage int) ([]*model.UserWithGroups, error) {
|
||||
start := time.Now()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user