strapi-plugin-comments 1.0.4 → 2.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/.circleci/config.yml +2 -2
  2. package/README.md +53 -126
  3. package/admin/src/components/ConfirmationDialog/index.js +56 -0
  4. package/admin/src/components/DiscussionStatus/index.js +33 -0
  5. package/admin/src/components/DiscussionThread/index.js +59 -0
  6. package/admin/src/components/DiscussionThreadItem/index.js +87 -0
  7. package/admin/src/components/DiscussionThreadItem/styles.js +88 -0
  8. package/admin/src/components/DiscussionThreadItemActions/index.js +178 -0
  9. package/admin/src/components/DiscussionThreadItemActions/styles.js +22 -0
  10. package/admin/src/components/DiscussionThreadItemMeta/index.js +31 -0
  11. package/admin/src/components/DiscussionThreadItemWarnings/index.js +141 -0
  12. package/admin/src/components/DiscussionThreadItemWarnings/styles.js +7 -0
  13. package/admin/src/components/EntityDetails/index.js +53 -0
  14. package/admin/src/{containers → components}/Initializer/index.js +4 -4
  15. package/admin/src/components/LoadingIndicatorOverlay/index.js +15 -0
  16. package/admin/src/components/LoadingIndicatorOverlay/styles.js +20 -0
  17. package/admin/src/components/Nav/index.js +45 -0
  18. package/admin/src/components/PluginIcon/index.js +12 -0
  19. package/admin/src/components/ReportsReviewModal/index.js +43 -0
  20. package/admin/src/components/ReportsReviewTable/index.js +146 -0
  21. package/admin/src/components/TableFilters/index.js +53 -0
  22. package/admin/src/components/TablePagination/index.js +35 -0
  23. package/admin/src/components/icons/comments.js +9 -0
  24. package/admin/src/components/icons/index.js +6 -0
  25. package/admin/src/components/icons/lock.js +22 -0
  26. package/admin/src/components/icons/review.js +18 -0
  27. package/admin/src/components/icons/unlock.js +20 -0
  28. package/admin/src/index.js +58 -42
  29. package/admin/src/pages/App/index.js +71 -0
  30. package/admin/src/pages/App/reducer/actions.js +8 -0
  31. package/admin/src/pages/App/reducer/constants.js +4 -0
  32. package/admin/src/pages/App/reducer/index.js +26 -0
  33. package/admin/src/pages/App/reducer/init.js +7 -0
  34. package/admin/src/pages/App/reducer/selectors.js +35 -0
  35. package/admin/src/pages/App/utils/api.js +12 -0
  36. package/admin/src/pages/ComingSoonPage/index.js +25 -0
  37. package/admin/src/pages/Details/index.js +109 -0
  38. package/admin/src/pages/Details/utils/api.js +41 -0
  39. package/admin/src/pages/Discover/components/DiscoverTableRow/index.js +196 -0
  40. package/admin/src/pages/Discover/index.js +157 -0
  41. package/admin/src/pages/Discover/utils/api.js +14 -0
  42. package/admin/src/pages/Discover/utils/filtersSchema.js +9 -0
  43. package/admin/src/permissions.js +13 -37
  44. package/admin/src/pluginId.js +2 -4
  45. package/admin/src/reducers.js +8 -0
  46. package/admin/src/translations/en.json +73 -37
  47. package/admin/src/translations/fr.json +1 -0
  48. package/admin/src/utils/axiosInstance.js +35 -0
  49. package/admin/src/utils/constants.js +25 -6
  50. package/admin/src/utils/getApiUrl.js +5 -0
  51. package/admin/src/utils/getMessage.js +21 -0
  52. package/admin/src/utils/getRelatedGroups.js +5 -0
  53. package/admin/src/utils/getUrl.js +5 -0
  54. package/admin/src/utils/handleAPIError.js +15 -0
  55. package/admin/src/utils/index.js +6 -0
  56. package/codecov.yml +2 -1
  57. package/content-types/comment.js +97 -0
  58. package/content-types/index.js +11 -0
  59. package/content-types/report.js +54 -0
  60. package/package.json +11 -25
  61. package/server/bootstrap.js +5 -0
  62. package/server/config/index.js +10 -0
  63. package/server/controllers/admin.js +134 -0
  64. package/server/controllers/client.js +117 -0
  65. package/server/controllers/index.js +9 -0
  66. package/{controllers → server/controllers}/utils/__tests__/functions.test.js +0 -0
  67. package/{controllers → server/controllers}/utils/functions.js +1 -1
  68. package/server/destroy.js +5 -0
  69. package/server/index.js +22 -0
  70. package/server/register.js +5 -0
  71. package/server/routes/admin.js +92 -0
  72. package/server/routes/client.js +52 -0
  73. package/server/routes/index.js +15 -0
  74. package/server/services/admin.js +215 -0
  75. package/server/services/client.js +227 -0
  76. package/server/services/common.js +197 -0
  77. package/server/services/index.js +11 -0
  78. package/{services → server/services}/utils/__tests__/functions.test.js +0 -0
  79. package/{services → server/services}/utils/functions.js +17 -6
  80. package/server/utils/constants.js +16 -0
  81. package/{services → server}/utils/error.js +0 -0
  82. package/server/utils/functions.js +19 -0
  83. package/strapi-admin.js +3 -0
  84. package/strapi-server.js +9 -0
  85. package/admin/src/assets/images/icon-cross-blue.svg +0 -1
  86. package/admin/src/assets/images/icon_remove.svg +0 -19
  87. package/admin/src/assets/images/logo.svg +0 -5
  88. package/admin/src/components/AbuseReportsPopUp/ItemPreviewContainer.js +0 -8
  89. package/admin/src/components/AbuseReportsPopUp/ModalFooter.js +0 -31
  90. package/admin/src/components/AbuseReportsPopUp/TableContainer.js +0 -63
  91. package/admin/src/components/AbuseReportsPopUp/index.js +0 -148
  92. package/admin/src/components/Container/index.js +0 -7
  93. package/admin/src/components/EmptyView/index.js +0 -25
  94. package/admin/src/components/Filters/index.js +0 -151
  95. package/admin/src/components/Filters/index.styled.js +0 -82
  96. package/admin/src/components/Filters/utils.js +0 -21
  97. package/admin/src/components/Item/CardItem.js +0 -30
  98. package/admin/src/components/Item/CardWrapper.js +0 -10
  99. package/admin/src/components/Item/index.js +0 -107
  100. package/admin/src/components/ItemDetails/CardItem.js +0 -33
  101. package/admin/src/components/ItemDetails/CardLevelCounter.js +0 -46
  102. package/admin/src/components/ItemDetails/CardLevelCounterLink.js +0 -24
  103. package/admin/src/components/ItemDetails/CardLevelWrapper.js +0 -22
  104. package/admin/src/components/ItemDetails/CardWrapper.js +0 -52
  105. package/admin/src/components/ItemDetails/index.js +0 -167
  106. package/admin/src/components/ItemFooter/CardItemAuthor.js +0 -10
  107. package/admin/src/components/ItemFooter/CardItemRelation.js +0 -18
  108. package/admin/src/components/ItemFooter/Wrapper.js +0 -20
  109. package/admin/src/components/ItemFooter/index.js +0 -87
  110. package/admin/src/components/ItemHeader/CardHeaderBlocked.js +0 -24
  111. package/admin/src/components/ItemHeader/CardHeaderIndicator.js +0 -30
  112. package/admin/src/components/ItemHeader/CardHeaderIndicatorBlue.js +0 -11
  113. package/admin/src/components/ItemHeader/CardHeaderIndicatorRed.js +0 -11
  114. package/admin/src/components/ItemHeader/CardHeaderIndicatorsContainer.js +0 -18
  115. package/admin/src/components/ItemHeader/CardHeaderPending.js +0 -11
  116. package/admin/src/components/ItemHeader/CardHeaderReports.js +0 -40
  117. package/admin/src/components/ItemHeader/Wrapper.js +0 -16
  118. package/admin/src/components/ItemHeader/index.js +0 -97
  119. package/admin/src/components/ItemModeration/Wrapper.js +0 -19
  120. package/admin/src/components/ItemModeration/index.js +0 -84
  121. package/admin/src/components/List/Container.js +0 -20
  122. package/admin/src/components/List/index.js +0 -21
  123. package/admin/src/components/Search/index.js +0 -83
  124. package/admin/src/containers/App/Wrapper.js +0 -14
  125. package/admin/src/containers/App/index.js +0 -47
  126. package/admin/src/containers/DataManagerProvider/actions.js +0 -15
  127. package/admin/src/containers/DataManagerProvider/index.js +0 -332
  128. package/admin/src/containers/DataManagerProvider/init.js +0 -5
  129. package/admin/src/containers/DataManagerProvider/reducer.js +0 -59
  130. package/admin/src/containers/DetailsView/Wrapper.js +0 -18
  131. package/admin/src/containers/DetailsView/index.js +0 -106
  132. package/admin/src/containers/ListView/FadedWrapper.js +0 -42
  133. package/admin/src/containers/ListView/Footer.js +0 -53
  134. package/admin/src/containers/ListView/Wrapper.js +0 -17
  135. package/admin/src/containers/ListView/components.js +0 -138
  136. package/admin/src/containers/ListView/index.js +0 -45
  137. package/admin/src/containers/Panel/actions.js +0 -5
  138. package/admin/src/containers/Panel/index.js +0 -191
  139. package/admin/src/containers/Panel/index.styled.js +0 -6
  140. package/admin/src/containers/Panel/reducer.js +0 -44
  141. package/admin/src/contexts/DataManagerContext.js +0 -5
  142. package/admin/src/hooks/useDataManager.js +0 -6
  143. package/admin/src/lifecycles.js +0 -3
  144. package/admin/src/translations/index.js +0 -7
  145. package/admin/src/utils/getTrad.js +0 -5
  146. package/admin/src/utils/getTradId.js +0 -5
  147. package/config/functions/bootstrap.js +0 -62
  148. package/config/routes.json +0 -142
  149. package/config/schema.graphql.js +0 -268
  150. package/controllers/comments.js +0 -228
  151. package/models/comment.js +0 -8
  152. package/models/comment.settings.json +0 -102
  153. package/models/report.js +0 -8
  154. package/models/report.settings.json +0 -49
  155. package/services/comments.js +0 -539
  156. package/services/utils/constants.js +0 -9
@@ -1,7 +0,0 @@
1
- import en from './en.json';
2
-
3
- const trads = {
4
- en,
5
- };
6
-
7
- export default trads;
@@ -1,5 +0,0 @@
1
- import pluginId from '../pluginId';
2
-
3
- const getTrad = id => `${pluginId}.${id}`;
4
-
5
- export default getTrad;
@@ -1,5 +0,0 @@
1
- import getTrad from './getTrad';
2
-
3
- const getTradId = (id) => ({ id: getTrad(id) });
4
-
5
- export default getTradId;
@@ -1,62 +0,0 @@
1
- module.exports = async () => {
2
- // Check if the plugin users-permissions is installed because the comments needs it
3
- if (Object.keys(strapi.plugins).indexOf('users-permissions') === -1) {
4
- throw new Error(
5
- 'In order to make the comments plugin work the users-permissions plugin is required'
6
- );
7
- }
8
-
9
- // Add permissions
10
- const actions = [
11
- {
12
- section: 'plugins',
13
- displayName: 'Access the Comments',
14
- uid: 'read',
15
- pluginName: 'comments',
16
- },
17
- {
18
- section: 'plugins',
19
- displayName: 'Moderation',
20
- uid: 'moderate',
21
- pluginName: 'comments',
22
- },
23
- {
24
- section: 'plugins',
25
- displayName: 'Single comments',
26
- uid: 'moderate.block.comment',
27
- subCategory: 'moderate',
28
- pluginName: 'comments',
29
- },
30
- {
31
- section: 'plugins',
32
- displayName: 'Comments threads',
33
- uid: 'moderate.block.thread',
34
- subCategory: 'moderate',
35
- pluginName: 'comments',
36
- },
37
- {
38
- section: 'plugins',
39
- displayName: 'Review & resolve reports',
40
- uid: 'moderate.reports',
41
- subCategory: 'moderate',
42
- pluginName: 'comments',
43
- },
44
- {
45
- section: 'plugins',
46
- displayName: 'Single comments',
47
- uid: 'moderate.approve.comment',
48
- subCategory: 'moderate',
49
- pluginName: 'comments',
50
- },
51
- {
52
- section: 'plugins',
53
- displayName: 'Single comments',
54
- uid: 'moderate.reject.comment',
55
- subCategory: 'moderate',
56
- pluginName: 'comments',
57
- },
58
- ];
59
-
60
- const { actionProvider } = strapi.admin.services.permission;
61
- await actionProvider.registerMany(actions);
62
- };
@@ -1,142 +0,0 @@
1
- {
2
- "routes": [
3
- {
4
- "method": "GET",
5
- "path": "/:relation",
6
- "handler": "comments.findAllInHierarchy",
7
- "config": {
8
- "policies": []
9
- }
10
- },
11
- {
12
- "method": "POST",
13
- "path": "/:relation",
14
- "handler": "comments.post",
15
- "config": {
16
- "policies": []
17
- }
18
- },
19
- {
20
- "method": "GET",
21
- "path": "/:relation/flat",
22
- "handler": "comments.findAllFlat",
23
- "config": {
24
- "policies": []
25
- }
26
- },
27
- {
28
- "method": "PUT",
29
- "path": "/:relation/comment/:commentId",
30
- "handler": "comments.put",
31
- "config": {
32
- "policies": []
33
- }
34
- },
35
- {
36
- "method": "POST",
37
- "path": "/:relation/comment/:commentId/report-abuse",
38
- "handler": "comments.reportAbuse",
39
- "config": {
40
- "policies": []
41
- }
42
- },
43
- {
44
- "method": "PATCH",
45
- "path": "/:relation/comment/:commentId/like",
46
- "handler": "comments.pointsUp",
47
- "config": {
48
- "policies": []
49
- }
50
- },
51
- {
52
- "method": "DELETE",
53
- "path": "/:relationId/:commentId",
54
- "handler": "comments.removeComment",
55
- "config": {
56
- "policies": []
57
- }
58
- },
59
- {
60
- "method": "GET",
61
- "path": "/moderation/all",
62
- "handler": "comments.findAll",
63
- "config": {
64
- "policies": [["admin::hasPermissions", ["plugins::comments.read"]]]
65
- }
66
- },
67
- {
68
- "method": "GET",
69
- "path": "/moderation/single/:id",
70
- "handler": "comments.findOne",
71
- "config": {
72
- "policies": [["admin::hasPermissions", ["plugins::comments.read"]]]
73
- }
74
- },
75
- {
76
- "method": "GET",
77
- "path": "/moderation/config",
78
- "handler": "comments.config",
79
- "config": {
80
- "policies": [["admin::hasPermissions", ["plugins::comments.read"]]]
81
- }
82
- },
83
- {
84
- "method": "GET",
85
- "path": "/moderation/contents-types/:contentTypeName",
86
- "handler": "comments.contentTypeName",
87
- "config": {
88
- "policies": [["admin::hasPermissions", ["plugins::comments.read"]]]
89
- }
90
- },
91
- {
92
- "method": "PUT",
93
- "path": "/moderation/block/:id",
94
- "handler": "comments.blockComment",
95
- "config": {
96
- "policies": [["admin::hasPermissions", ["plugins::comments.moderate.block.comment"]]]
97
- }
98
- },
99
- {
100
- "method": "PUT",
101
- "path": "/moderation/block-thread/:id",
102
- "handler": "comments.blockCommentThread",
103
- "config": {
104
- "policies": [["admin::hasPermissions", ["plugins::comments.moderate.block.thread"]]]
105
- }
106
- },
107
- {
108
- "method": "PATCH",
109
- "path": "/moderation/abuse-reports/:commentId/resolve/:id",
110
- "handler": "comments.resolveAbuseReport",
111
- "config": {
112
- "policies": [["admin::hasPermissions", ["plugins::comments.moderate.reports"]]]
113
- }
114
- },
115
- {
116
- "method": "PUT",
117
- "path": "/moderation/approve/:id",
118
- "handler": "comments.approveComment",
119
- "config": {
120
- "policies": [
121
- [
122
- "admin::hasPermissions",
123
- ["plugins::comments.moderate.approve.comment"]
124
- ]
125
- ]
126
- }
127
- },
128
- {
129
- "method": "PUT",
130
- "path": "/moderation/reject/:id",
131
- "handler": "comments.rejectComment",
132
- "config": {
133
- "policies": [
134
- [
135
- "admin::hasPermissions",
136
- ["plugins::comments.moderate.reject.comment"]
137
- ]
138
- ]
139
- }
140
- }
141
- ]
142
- }
@@ -1,268 +0,0 @@
1
- const BASE_COMMENTS = `
2
- id: ID!
3
- content: String!
4
- blocked: Boolean
5
- blockedThread: Boolean
6
- blockReason: String
7
- points: Int
8
- authorUser: UsersPermissionsUser
9
- authorType: String
10
- authorId: String
11
- authorName: String
12
- authorAvatar: String
13
- removed: Boolean
14
- relatedSlug: String
15
- reports: [CommentReport]
16
- approvalStatus: CommentApprovalStatus
17
- `;
18
-
19
- const configRelatedContentTypes = Object.keys(strapi.config
20
- .get('plugins.comments.relatedContentTypes') || {})
21
- .map(key => `${key}: CommentsRelatedContentType`)
22
- .join('\n');
23
- // reports: [CommentReport]
24
- module.exports = {
25
- // language=GraphQL
26
- definition: `
27
- scalar Relation
28
- enum CommentReportReason {
29
- BAD_LANGAUGE
30
- DISCRIMINATION
31
- OTHER
32
- }
33
- enum CommentApprovalStatus {
34
- PENDING
35
- APPROVED
36
- REJECTED
37
- }
38
- type CommentReport {
39
- id: ID!
40
- content: String
41
- reason: CommentReportReason!
42
- resolved: Boolean!
43
- related: Comment
44
- }
45
-
46
- type Comment {
47
- ${BASE_COMMENTS}
48
- }
49
-
50
- type CommentsInHierarchy {
51
- ${BASE_COMMENTS}
52
- children: [Comment]
53
- }
54
-
55
- type CommentsPagination {
56
- items: [Comment]!
57
- total: Int!
58
- page: Float
59
- }
60
-
61
- type CommentsWithThread {
62
- ${BASE_COMMENTS}
63
- threadOf: Comment
64
- }
65
-
66
- type CommentsFindOne {
67
- selected: CommentsWithThread
68
- level: [Comment]!
69
- }
70
-
71
- type CommentsContentTypes {
72
- key: String!
73
- value: String!
74
- }
75
-
76
- type CommentsRelatedContentType {
77
- contentManager: Boolean
78
- isSingle: Boolean
79
- url: String
80
- }
81
-
82
- type CommentsRelatedContentTypes {
83
- ${configRelatedContentTypes}
84
- }
85
-
86
- type CommentsConfig {
87
- contentsTypes: [CommentsContentTypes]!
88
- relatedContentTypes: CommentsRelatedContentTypes
89
- }
90
-
91
- type CommentsContentType {
92
- key: String!
93
- value: String
94
- }
95
-
96
- type CommentRemove {
97
- id: ID!
98
- }
99
-
100
- input NewCommentRelated {
101
- refId: String!
102
- ref: String!
103
- field: String!
104
- }
105
-
106
- input CommentNew {
107
- authorId: String
108
- authorName: String
109
- authorEmail: String
110
- content: String!
111
- authorUsername: String
112
- threadOf: String
113
- related: [NewCommentRelated!]!
114
- approvalStatus: CommentApprovalStatus
115
- }
116
- `,
117
- // language=GraphQL
118
- query: `
119
- findAllInHierarchy(relation: Relation!, where: JSON): [CommentsInHierarchy]!
120
- findAllFlat(relation: Relation!, where: JSON): [Comment]!
121
- findAll(related: Relation, entity: ID, where: JSON): CommentsPagination!
122
- findOne(id: ID!): CommentsFindOne
123
- config: CommentsConfig
124
- contentTypeName(contentType: String!): [CommentsContentType]!
125
- `,
126
- type: {
127
- Relation: 'It is related slug given when comment was created',
128
- },
129
- // language=GraphQL
130
- mutation: `
131
- commentAdd(comment: CommentNew): Comment!
132
- commentUpdate(id: ID!, content: String!, related: NewCommentRelated): Comment!
133
- commentReportAbuse(id: ID!, relation: Relation!, reason: CommentReportReason!, content: String!): CommentReport
134
- commentLike(id: ID!, relation: Relation!): Comment
135
- commentRemove(id: ID!, relation: Relation!, authorId: ID!): CommentRemove
136
- commentBlock(id: ID!): Comment
137
- commentThreadBlock(id: ID!): Comment
138
- commentResolveReport(reportId: ID!, commentId: ID!): CommentReport
139
- `,
140
- resolver: {
141
- Query: {
142
- findAllInHierarchy: {
143
- resolverOf: 'plugins::comments.comments.findAllInHierarchy',
144
- resolver(obj, options) {
145
- const { relation, where } = options;
146
- return strapi.plugins.comments.services.comments.findAllInHierarchy({
147
- relation,
148
- where,
149
- dropBlockedThreads: true,
150
- });
151
- },
152
- },
153
- findAllFlat: {
154
- resolverOf: 'plugins::comments.comments.findAllFlat',
155
- resolver(obj, options) {
156
- const { relation, where } = options;
157
- return strapi.plugins.comments.services.comments.findAllFlat(relation, where);
158
- },
159
- },
160
- findAll: {
161
- resolverOf: 'plugins::comments.comments.findAll',
162
- resolver(obj, options) {
163
- const { related, entity, where } = options;
164
- return strapi.plugins.comments.services.comments.findAll({
165
- ...where,
166
- related,
167
- entity,
168
- });
169
- },
170
- },
171
- findOne: {
172
- resolverOf: 'plugins::comments.comments.findOne',
173
- resolver(obj, options) {
174
- const { id } = options;
175
- return strapi.plugins.comments.services.comments.findOneAndThread(id);
176
- },
177
- },
178
- config: {
179
- resolverOf: 'plugins::comments.comments.config',
180
- resolver(obj, options, { context }) {
181
- return strapi.plugins.comments.controllers.comments.config(context);
182
- },
183
- },
184
- contentTypeName: {
185
- resolverOf: 'plugins::comments.comments.contentTypeName',
186
- resolver(obj, options) {
187
- const { contentType } = options;
188
- return strapi.plugins.comments.services.comments.contentTypeName(contentType);
189
- },
190
- },
191
- },
192
- Mutation: {
193
- commentAdd: {
194
- resolverOf: 'plugins::comments.comments.post',
195
- policies: ['plugins::users-permissions.isAuthenticated'],
196
- resolver(obj, options, { context }) {
197
- const user = context.state.user;
198
- const { comment } = options;
199
- return strapi.plugins.comments.services.comments
200
- .create(comment, user);
201
- },
202
- },
203
- commentUpdate: {
204
- resolverOf: 'plugins::comments.comments.put',
205
- policies: ['plugins::users-permissions.isAuthenticated'],
206
- resolver(obj, options, { context }) {
207
- const user = context.state.user;
208
- const { id, ...data } = options;
209
- return strapi.plugins.comments.services.comments
210
- .update(id, data, user);
211
- },
212
- },
213
- commentReportAbuse: {
214
- resolverOf: 'plugins::comments.comments.reportAbuse',
215
- policies: ['plugins::users-permissions.isAuthenticated'],
216
- resolver(obj, options, { context }) {
217
- const user = context.state.user;
218
- const { id, relation, reason, content } = options;
219
- return strapi.plugins.comments.services.comments
220
- .reportAbuse(id, relation, { reason, content }, user);
221
- },
222
- },
223
- commentLike: {
224
- resolverOf: 'plugins::comments.comments.pointsUp',
225
- policies: ['plugins::users-permissions.isAuthenticated'],
226
- resolver(obj, options, { context }) {
227
- const user = context.state.user;
228
- const { id, relation } = options;
229
- return strapi.plugins.comments.services.comments
230
- .pointsUp(id, relation, user);
231
- },
232
- },
233
- commentRemove: {
234
- resolverOf: 'plugins::comments.comments.removeComment',
235
- resolver(obj, options) {
236
- const { id, relation, authorId } = options;
237
- return strapi.plugins.comments.services.comments
238
- .markAsRemoved(relation, id, authorId);
239
- },
240
- },
241
- commentBlock: {
242
- resolverOf: 'plugins::comments.comments.blockComment',
243
- resolver(obj, options) {
244
- const { id } = options;
245
- return strapi.plugins.comments.services.comments
246
- .blockComment(id);
247
- },
248
- },
249
- commentThreadBlock: {
250
- resolverOf: 'plugins::comments.comments.blockCommentThread',
251
- resolver(obj, options) {
252
- const { id } = options;
253
- return strapi.plugins.comments.services.comments
254
- .blockCommentThread(id);
255
- },
256
- },
257
- commentResolveReport: {
258
- resolverOf: 'plugins::comments.comments.resolveAbuseReport',
259
- resolver(obj, options) {
260
- const { reportId, commentId } = options;
261
- return strapi.plugins.comments.services.comments
262
- .resolveAbuseReport(reportId, commentId);
263
- },
264
- },
265
- },
266
- },
267
- };
268
-