[MM-43917] Cloud Freemium limits API: messages/posts (#20152)
* WIP - Add api and app funcs * Add test cases * Add utils testcases * Exclude deleted posts * Add doc for func * Move api from cloud to usage * Allow api access to authenticated users * Change int to int64 * Fix lint issue * Simplify err check Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Ashish Bhate <ashish.bhate@mattermost.com>
Этот коммит содержится в:
@@ -2102,7 +2102,7 @@ func TestPermanentDeleteAllUsers(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Greater(t, len(users), 0)
|
||||
|
||||
postCount, err := th.App.Srv().Store.Post().AnalyticsPostCount("", false, false)
|
||||
postCount, err := th.App.Srv().Store.Post().AnalyticsPostCount(&model.PostCountOptions{})
|
||||
require.NoError(t, err)
|
||||
require.Greater(t, postCount, int64(0))
|
||||
|
||||
@@ -2115,7 +2115,7 @@ func TestPermanentDeleteAllUsers(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
require.Len(t, users, 0)
|
||||
|
||||
postCount, err = th.App.Srv().Store.Post().AnalyticsPostCount("", false, false)
|
||||
postCount, err = th.App.Srv().Store.Post().AnalyticsPostCount(&model.PostCountOptions{})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, postCount, int64(0))
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user