Adds includeDeleted flag to get remote cluster app and store methods (#28182)

Этот коммит содержится в:
Miguel de la Cruz
2024-09-13 23:08:53 +02:00
коммит произвёл GitHub
родитель 46ca7747f8
Коммит cae456de2d
19 изменённых файлов: 78 добавлений и 57 удалений

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

@@ -110,7 +110,7 @@ func getSharedChannelRemotesByRemoteCluster(c *Context, w http.ResponseWriter, r
return
}
if _, appErr := c.App.GetRemoteCluster(c.Params.RemoteId); appErr != nil {
if _, appErr := c.App.GetRemoteCluster(c.Params.RemoteId, true); appErr != nil {
c.Err = appErr
return
}
@@ -154,7 +154,7 @@ func inviteRemoteClusterToChannel(c *Context, w http.ResponseWriter, r *http.Req
return
}
if rc, appErr := c.App.GetRemoteCluster(c.Params.RemoteId); appErr != nil || rc.DeleteAt != 0 {
if _, appErr := c.App.GetRemoteCluster(c.Params.RemoteId, false); appErr != nil {
c.SetInvalidRemoteIdError(c.Params.RemoteId)
return
}
@@ -201,7 +201,7 @@ func uninviteRemoteClusterToChannel(c *Context, w http.ResponseWriter, r *http.R
return
}
if rc, appErr := c.App.GetRemoteCluster(c.Params.RemoteId); appErr != nil || rc.DeleteAt != 0 {
if _, appErr := c.App.GetRemoteCluster(c.Params.RemoteId, false); appErr != nil {
c.SetInvalidRemoteIdError(c.Params.RemoteId)
return
}