Этот коммит содержится в:
Conor Macpherson
2022-12-29 15:07:06 -05:00
родитель 6685268085
Коммит 4e54a40a21
4 изменённых файлов: 8 добавлений и 8 удалений

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

@@ -751,7 +751,7 @@ func handleCWSWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
}
func handleCheckCWSConnection(c *Context, w http.ResponseWriter, r *http.Request) {
if err := c.App.Cloud().CheckCWSConnection(); err != nil {
if err := c.App.Cloud().CheckCWSConnection(c.AppContext.Session().UserId); err != nil {
c.Err = model.NewAppError("Api4.handleCWSHealthCheck", "api.server.cws.health_check.app_error", nil, "CWS Server is not available.", http.StatusInternalServerError)
return
}

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

@@ -46,5 +46,5 @@ type CloudInterface interface {
CreateOrUpdateSubscriptionHistoryEvent(userID string, userCount int) (*model.SubscriptionHistory, error)
HandleLicenseChange() error
CheckCWSConnection() error
CheckCWSConnection(userId string) error
}

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

@@ -60,13 +60,13 @@ func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID strin
return r0, r1
}
// CheckCWSConnection provides a mock function with given fields:
func (_m *CloudInterface) CheckCWSConnection() error {
ret := _m.Called()
// CheckCWSConnection provides a mock function with given fields: userId
func (_m *CloudInterface) CheckCWSConnection(userId string) error {
ret := _m.Called(userId)
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
if rf, ok := ret.Get(0).(func(string) error); ok {
r0 = rf(userId)
} else {
r0 = ret.Error(0)
}

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

@@ -8700,7 +8700,7 @@ func (c *Client4) AddUserToGroupSyncables(userID string) (*Response, error) {
return BuildResponse(r), nil
}
func (c *Client4) CheckCWSConnection() (*Response, error) {
func (c *Client4) CheckCWSConnection(userId string) (*Response, error) {
r, err := c.DoAPIGet(c.cloudRoute()+"/healthz", "")
if err != nil {