-
- Downloads
[Discourse] Update schema keys to use plural form (`topic_count` -> `topics_count`) (#9778)
* Discourse: Update schema to use plural keys (e.g. topic_count -> topics_countN) * Revert "Discourse: Update schema to use plural keys" This reverts commit 4073a17aaaaa253ce9ef01754ede77ba5deaa7f5. * `discourse.service.js`: Add `Joi.alternatives` plural schema * `discourse.service.js`: Update func to be plural-agnostic Previously, for e.g. 'topic', the call to the `DiscourseMetricIntegrationFactory` function supplied both 'topics' and 'topic_count'. And, we now need to check for 'topics_count' as well. To cover all three string variations, why not supply only 'topic' to the function, then selectively add the 's' on a case-by-case basis. ((Note: I've preserved the old metricName variable as to minimize the diff here and make my changes clearer.)) * `discourse.tester.js`: Add second `data` case * Address Prettier linting warnings
Loading
Please register or sign in to comment