-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 4073a17. * `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 branch information
1 parent
57820b2
commit f6e40a6
Showing
2 changed files
with
110 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters