Этот коммит содержится в:
Shivashis Padhi
2022-08-11 12:19:25 +05:30
родитель 4ec3eade3b
Коммит e5c1b17d77
2 изменённых файлов: 4 добавлений и 6 удалений

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

@@ -225,7 +225,7 @@ func getTopChannelsForUserSince(c *Context, w http.ResponseWriter, r *http.Reque
js, jsonErr := json.Marshal(topChannels) js, jsonErr := json.Marshal(topChannels)
if jsonErr != nil { if jsonErr != nil {
c.Err = model.NewAppError("getTopChannelsForUserSince", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err) c.Err = model.NewAppError("getTopChannelsForUserSince", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(jsonErr)
return return
} }
@@ -318,9 +318,9 @@ func getTopThreadsForUserSince(c *Context, w http.ResponseWriter, r *http.Reques
return return
} }
js, err := json.Marshal(topThreads) js, jsonErr := json.Marshal(topThreads)
if err != nil { if jsonErr != nil {
c.Err = model.NewAppError("getTopThreadsForUserSince", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(err) c.Err = model.NewAppError("getTopThreadsForUserSince", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(jsonErr)
return return
} }

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

@@ -3067,8 +3067,6 @@ func TestGetTopDMsForUserSince(t *testing.T) {
th := Setup(t).InitBasic() th := Setup(t).InitBasic()
defer th.TearDown() defer th.TearDown()
th.Server.configStore.SetReadOnlyFF(false)
defer th.Server.configStore.SetReadOnlyFF(true)
th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true }) th.App.UpdateConfig(func(cfg *model.Config) { cfg.FeatureFlags.InsightsEnabled = true })
// users // users